From 0fe7608e8755d4c0cab96e7a4c45eda1f74de3cc Mon Sep 17 00:00:00 2001 From: Trey Blancher Date: Fri, 11 Nov 2022 13:21:25 -0500 Subject: [PATCH] Added README.md --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..4726a9b --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +# 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.