1PDD(1)                           User Commands                          PDD(1)
2
3
4

NAME

6       pdd - Tiny date, time difference calculator with timers.
7

SYNOPSIS

9       pdd [OPTIONS] [KEYWORDS ...]
10

DESCRIPTION

12       pdd  (python3  date diff) is a small utility to calculate date and time
13       difference. It can also be used as a timer. If no program arguments are
14       specified it shows the current date, time and timezone.
15
16       Features
17
18       - easy to use, minimal dependencies
19       - calculate date and time difference
20       - add, subtract duration (timeslice) to/from date (time)
21       - calculate diff from today and now
22       - countdown timer with command piggybacking
23       - custom resolution stopwatch
24       - non-verbose mode for background timers
25       - show current date, time and timezone
26       - follows ISO 8601
27
28       Operational notes
29
30       -  ISO  8601 format. Month can be specified as month number (e.g. Jan -
31       1, Dec - 12).
32       - Time is in 24-hr format.
33       - The absolute difference is shown. Argument order is ignored.
34       - The end date is excluded in date difference calculations.
35       - Hour, minute or second can be omitted. Partial inputs are  recognized
36       as mm:ss or ss.
37       - The keybind to stop timers is Ctrl-C.
38

OPTIONS

40       -h, --help
41              Show help text and exit.
42
43       -d yyyy mmm dd [yyyy mmm dd | y m d]
44              Calculate date difference.
45
46       -t hh:mm:ss [hh:mm:ss | h:m:s]
47              Calculate time difference.
48
49       --add  Add a duration or timeslice to date (/today) or time (/now).
50
51       --sub  Subtract  a  duration  or  timeslice  from date (/today) or time
52              (/now).
53
54       --day yyyy mmm dd
55              Show the day of the week on a date.
56
57       -c hh:mm:ss
58              Set a countdown timer with duration in hours, minutes  and  sec‐
59              onds.
60
61       -r command
62              Run command when countdown timer reaches 0.
63
64       -s [resolution]
65              Start a custom resolution stopwatch. resolution can range from 1
66              to 9. Default 3 for millisecond.
67
68       -q     Quiet mode for a countdown timer or stopwatch to be run  in  the
69              background. The counter is shown only when Ctrl-C is pressed.
70

EXAMPLES

72       1.  Calculate diff from today:
73
74              $ pdd 2014 Jan 15
75
76       2.  Calculate diff from now:
77
78              $ pdd 24:00:00
79              $ pdd 0
80
81       3.  Calculate date diff:
82
83              $ pdd -d 1983 jul 3 2014 1 15
84
85       4.  Calculate time diff:
86
87              $ pdd -t 45:50 6:17:33
88
89       5.  Show current date, time and timezone:
90
91              $ pdd
92
93       6.  Specify time with roll-over:
94
95              $ pdd -t 5:80:75 6:17:33
96
97       7.  Add a duration (3 years, 2 months, 1 day) to 28 Feb, 2000:
98
99              $ pdd -d 2000 FEB 28 3 2 1 --add
100
101       8.  Add a timeslice (1 hour 2 mins 3 secs) to 23:45:37:
102
103              $ pdd -t 23:45:37 1:2:3 --add
104
105       9.  Add a duration (3 years, 2 months, 1 day) to today:
106
107              $ pdd 3 2 1 --add
108
109       10. Add a timeslice (1 hour 2 minutes 3 seconds) to now:
110
111              $ pdd 1:2:3 --add
112
113       11. Subtract a duration (1 day) from 1 Mar, 2000:
114
115              $ pdd -d 2000 Mar 01 0 0 1 --sub
116
117       12. Subtract a timeslice (1 sec) from midnight:
118
119              $ pdd -t 00:00:00 0:0:1 --sub
120
121       13. Subtract a duration (3 years, 2 months, 1 day) from today:
122
123              $ pdd 3 2 1 --sub
124
125       14. Subtract a timeslice (1 hour 2 minutes 3 seconds) from now:
126
127              $ pdd 1:2:3 --sub
128
129       15. Show the day of the week on 15 Jan 2014:
130
131              $ pdd --day 2014 Jan 15
132
133       16. Start  a  countdown  timer  or stopwatch in quiet mode in the back‐
134           ground:
135
136              $ pdd -qs &
137              $ pdd -qc 3:0:0 &
138
139           To see the final counter run fg and press Ctrl-C.
140
141       17. Run a command when countdown timer reaches 0:
142
143              $ pdd -c 00:00:5 -r 'ps -aux'
144              $ pdd -c 00:00:5 -r 'notify-send pdd expired'
145

AUTHORS

147       Arun Prakash Jana <engineerarun@gmail.com>
148

HOME

150       https://github.com/jarun/pdd
151

REPORTING BUGS

153       https://github.com/jarun/pdd/issues
154

LICENSE

156       Copyright © 2017 Arun Prakash Jana <engineerarun@gmail.com>
157
158       License     GPLv3+:     GNU     GPL     version     3     or      later
159       <http://gnu.org/licenses/gpl.html>.
160       This  is  free  software:  you  are free to change and redistribute it.
161       There is NO WARRANTY, to the extent permitted by law.
162
163
164
165Version 1.5                       10 Oct 2020                           PDD(1)
Impressum