21 lines
938 B
Markdown
21 lines
938 B
Markdown
|
# date-tally
|
||
|
|
||
|
tblancher's date-tally program. Take's input from file or stdin, in the following log format:
|
||
|
```
|
||
|
tag:date
|
||
|
```
|
||
|
Where `date` is the output of the Linux or macOS `date` program. E.g.:
|
||
|
|
||
|
```
|
||
|
my_tag:Wed Nov 9 12:51:32 EST 2022
|
||
|
my_tag:Fri Nov 11 13:02:47 EST 2022
|
||
|
```
|
||
|
`date-tally` computes the number of weeks, days, hours, minutes, and seconds between successive entries in this log. E.g.:
|
||
|
|
||
|
```
|
||
|
my_tag: 0 weeks, 2 days, 0 hours, 11 minutes, 15 seconds
|
||
|
```
|
||
|
|
||
|
## Note
|
||
|
Due to limitations of Rust's strftime implementation, the string representation of the timezone (in the example above, "EST") is ignored. This program currently assumes the timezone is US Eastern Time (`America/New_York`). If the log contains other timezones, we'd have to add functionality to convert the string timezone representation (with its ambiguities) to a fixed offset representation. Such changes are beyond the scope of this at the current time.
|