Add option --until
We have --since (alias for --from-date), let's have --until for --to-date...
--- a/gobm65.go Sat Jul 10 20:57:45 2021 +0200
+++ b/gobm65.go Sat Jul 10 22:15:47 2021 +0200
@@ -31,9 +31,11 @@
// Display the latest 3 records with the average:
// % gobm65 -l 3 --average
// Display all records since a specific date:
+// % gobm65 --from-date "2016-06-01"
// % gobm65 --since "2016-06-01"
// Display all records before a specific date:
// % gobm65 --to-date "2016-06-30"
+// % gobm65 --until "2016-06-30"
// Display all records of the last 7 days:
// % gobm65 --since "$(date "+%F" -d "7 days ago")"
//
@@ -583,6 +585,7 @@
reduce := flag.BoolP("reduce", "r", false, "Reduce number of measurements (regroup measurements)")
flag.StringVar(fromDate, "since", "", "Same as --from-date")
+ flag.StringVar(toDate, "until", "", "Same as --to-date")
var startTime, endTime simpleTime