PDD(1)
π PDD(1) β User Commands π
okay bestie, welcome to pdd, aka section 1 of the manual, and no you're not dreaming, this is genuinely the whole vibe πΈ
β¨ NAME β¨
pdd β a tiny date + time difference calculator, and yes she also does timers π
π SYNOPSIS π
pdd [OPTIONS] [KEYWORDS ...]
π¦ DESCRIPTION π¦
so pdd (which stands for python3 date diff, iykyk) is this little utility that calculates date and time difference. it also doubles as a timer, main character energy fr. and listen β if you pass it no program arguments at all, it just shows you the current date, time and timezone. iconic behaviour, honestly π
π Features π
- easy to use, minimal dependencies (she's low maintenance, we love that)
- calculate date and time difference
- add, subtract duration (timeslice) to/from date (time)
- calculate diff from today and now
- countdown timer with command piggybacking
- custom resolution stopwatch
- non-verbose mode for background timers
- show current date, time and timezone
- follows ISO 8601
π Operational notes π
- ISO 8601 format. Month can be specified as month number (e.g. Jan - 1, Dec - 12).
- Time is in 24-hr format.
- The absolute difference is shown. Argument order is ignored.
- The end date is excluded in date difference calculations.
- Hour, minute or second can be omitted. Partial inputs are recognized as mm:ss or ss.
- The keybind to stop timers is Ctrl-C.
β¨ OPTIONS β¨
-h,--helpβ show help text and exit. the classic "help me bestie" move π«Ά-d,--date yyyy mmm dd [yyyy mmm dd | y m d]β calculate date difference.-t,--time hh:mm:ss [hh:mm:ss | h:m:s]β calculate time difference.--addβ add a duration or timeslice to date (/today) or time (/now).--subβ subtract a duration or timeslice from date (/today) or time (/now).--day yyyy mmm ddβ show the day of the week on a date. like, what day WAS that, fr π-c,--timer hh:mm:ssβ set a countdown timer with duration in hours, minutes and seconds.-r,--run commandβ run command when countdown timer reaches 0. piggyback time π-s,--stopwatch [resolution]β start a custom resolution stopwatch. resolution can range from 1 to 9. Default 3 for millisecond.-q,--quietβ quiet mode for a countdown timer or stopwatch to be run in the background. The counter is shown only when Ctrl-C is pressed.
π EXAMPLES π
- Calculate diff from today:
$ pdd 2014 Jan 15
- Calculate diff from now:
$ pdd 24:00:00
$ pdd 0
- Calculate date diff:
$ pdd -d 1983 jul 3 2014 1 15
- Calculate time diff:
$ pdd -t 45:50 6:17:33
- Show current date, time and timezone:
$ pdd
- Specify time with roll-over:
$ pdd -t 5:80:75 6:17:33
- Add a duration (3 years, 2 months, 1 day) to 28 Feb, 2000:
$ pdd -d 2000 FEB 28 3 2 1 --add
- Add a timeslice (1 hour 2 mins 3 secs) to 23:45:37:
$ pdd -t 23:45:37 1:2:3 --add
- Add a duration (3 years, 2 months, 1 day) to today:
$ pdd 3 2 1 --add
- Add a timeslice (1 hour 2 minutes 3 seconds) to now:
$ pdd 1:2:3 --add
- Subtract a duration (1 day) from 1 Mar, 2000:
$ pdd -d 2000 Mar 01 0 0 1 --sub
- Subtract a timeslice (1 sec) from midnight:
$ pdd -t 00:00:00 0:0:1 --sub
- Subtract a duration (3 years, 2 months, 1 day) from today:
$ pdd 3 2 1 --sub
- Subtract a timeslice (1 hour 2 minutes 3 seconds) from now:
$ pdd 1:2:3 --sub
- Show the day of the week on 15 Jan 2014:
$ pdd --day 2014 Jan 15
- Start a countdown timer or stopwatch in quiet mode in the background:
$ pdd -qs &
$ pdd -qc 3:0:0 &
To see the final counter run fg and press Ctrl-C.
- Run a command when countdown timer reaches 0:
$ pdd -c 00:00:5 -r 'ps -aux'
$ pdd -c 00:00:5 -r 'notify-send pdd expired'
π AUTHORS π
Arun Prakash Jana <engineerarun@gmail.com> β the legend, respectfully π
π HOME π
π REPORTING BUGS π
https://github.com/jarun/pdd/issues
bestie if something's acting up, drop it in the issues, no gatekeeping π
β LICENSE β
Copyright Β© 2017 Arun Prakash Jana <engineerarun@gmail.com>
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
no cap, there is genuinely NO WARRANTY, to the extent permitted by law. she's free, she's open, she's yours to remix π
Version 1.7, dated 03 Dec 2022 β that's the whole page bestie, mwah, go forth and calculate your little heart out πβ¨π
π¦ where this page comes from
- alpine 3.24: pdd-doc 1.7-r4 Β· GPL-3.0-only
- debian bookworm: pdd 1.7-1 Β· GPL-3.0-or-later
- debian trixie: pdd 1.7-2 Β· GPL-3.0-or-later
- fedora 43: pdd 1.7-8.fc43 Β· GPL-3.0-or-later
- fedora 44: pdd 1.7-9.fc44 Β· GPL-3.0-or-later
- nixos 26.05: pdd 1.7
- nixpkgs unstable: pdd 1.7
- ubuntu noble: pdd 1.7-2 Β· GPL-3.0-or-later
- ubuntu questing: pdd 1.7-2
- ubuntu resolute: pdd 1.7-2build1 Β· GPL-3.0-or-later
- ubuntu stonking: pdd 1.7-2build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms