# HG changeset patch # User Bernhard Reiter # Date 1578305143 -3600 # Node ID a4044956e08cc4ade2777d0cde88a54896b06c83 # Parent fa1eb72e2764498449cce7ae81b53cd16ed9a500 scripts/getan-daily-report: improve summary output * .. by printing the day first, using an YYYYMMDD and localized weekday abbreviation because this is BER's default format. diff -r fa1eb72e2764 -r a4044956e08c CHANGES --- a/CHANGES Fri Jun 14 16:11:47 2019 +0200 +++ b/CHANGES Mon Jan 06 11:05:43 2020 +0100 @@ -1,3 +1,9 @@ +(unreleased) + + * scripts/getan-daily-report: improve summary output by printing the day + first. (Bernhard Reiter) + + 3.3 2019-06-14 * When describing entries, you can now use the arrow keys to select and edit diff -r fa1eb72e2764 -r a4044956e08c scripts/getan-daily-report --- a/scripts/getan-daily-report Fri Jun 14 16:11:47 2019 +0200 +++ b/scripts/getan-daily-report Mon Jan 06 11:05:43 2020 +0100 @@ -21,11 +21,16 @@ import argparse import datetime +import locale import logging import sqlite3 factor = {'privat': 0} +# sets the locale for all categories to the user’s default setting +#(typically specified in the LANG environment variable). +locale.setlocale(locale.LC_ALL, '') + l = logging l.basicConfig(level=logging.INFO, # l.basicConfig(level=logging.DEBUG, @@ -165,6 +170,7 @@ total_time += length task_total[e[1]] += length + print(report_range_start.strftime("%Y%m%d %a"), end=" ") print("(" + hhhmm_from_timedelta(total_time).strip() + ")") for t in tasks: if task_total[t] != datetime.timedelta(0):