dateutils

dateutils: calcoli con le date nel Terminale. dateadd, datediff, dateseq, dateconv, dateround, datetest, dategrep e strptime contano giorni, settimane, mesi e giorni lavorativi. Scrivi datediff 2026-10-02 2026-12-25.

versione 0.4.12 · Licenza: BSD-3-Clause · Sito del progetto

dateutils

A cosa serve

Calcoli con le date senza sbagliare: quanti giorni mancano, che giorno sarà fra 45 giorni o fra 10 giorni lavorativi, sequenze di scadenze, conversione di formati.

Come si usa

Comando Cosa fa
datediff 2026-10-02 2026-12-25 giorni tra due date (-f '%w weeks %d days' per settimane e giorni)
dateadd 2026-10-02 +45d data fra 45 giorni (+3w settimane, +2mo mesi, -1y anni)
dateadd 2026-10-02 +10b fra 10 giorni lavorativi (salta sabati e domeniche)
dateseq 2026-10-01 +1w 2026-11-01 una data ogni settimana tra le due
dateconv 2026-10-02 -f '%A %d %B %Y' la data scritta per esteso
dateround 2026-10-02 Mon il prossimo lunedì
datetest 2026-10-02 --lt 2026-12-25 confronto (risponde con lo stato di uscita)
dategrep '>=2026-10-01' < scadenze.txt le righe con date da ottobre in poi
strptime -i '%d/%m/%Y' 02/10/2026 legge date scritte all'italiana

now e today valgono come data di oggi. dateutils da solo elenca i comandi; ognuno ha --help.

Con Anima

È un programma di sistema: Anima lo usa da sola quando serve una risposta esatta. Puoi anche chiederle di usarlo, per esempio "quanti giorni lavorativi mancano a Natale?".

Limiti

Gli orari sono in UTC e i fusi orari (datezone) richiedono i file zoneinfo, che non sono inclusi. I nomi di giorni e mesi sono in inglese. datesort non c'è.

Nel Terminale

dateutils

dateutils: date arithmetic in the Terminal. dateadd, datediff, dateseq, dateconv, dateround, datetest, dategrep and strptime count days, weeks, months and business days. Type datediff 2026-10-02 2026-12-25.

version 0.4.12 · License: BSD-3-Clause · Project site

dateutils

What it is for

Date arithmetic without mistakes: how many days are left, which day it will be in 45 days or in 10 business days, series of deadlines, format conversions.

How to use it

Command What it does
datediff 2026-10-02 2026-12-25 days between two dates (-f '%w weeks %d days' for weeks and days)
dateadd 2026-10-02 +45d the date in 45 days (+3w weeks, +2mo months, -1y years)
dateadd 2026-10-02 +10b in 10 business days (skips weekends)
dateseq 2026-10-01 +1w 2026-11-01 one date per week between the two
dateconv 2026-10-02 -f '%A %d %B %Y' the date written out
dateround 2026-10-02 Mon the next Monday
datetest 2026-10-02 --lt 2026-12-25 comparison (answers with the exit status)
dategrep '>=2026-10-01' < deadlines.txt lines with dates from October on
strptime -i '%d/%m/%Y' 02/10/2026 reads dates in other formats

now and today mean today. dateutils alone lists the tools; each one takes --help.

With Anima

It is a system program: Anima uses it by itself when an exact answer is needed. You can also ask for it, for example "how many business days until Christmas?".

Limits

Times are UTC and time zones (datezone) need the zoneinfo files, which are not included. Day and month names are English. datesort is not included.

In the Terminal