Add date_format config key for csv command

- Add get_date_format() to config.py: reads [csv] date_format, returns
  None when absent (falls back to the default %d/%m/%y)
- _cmd_csv applies the format to both single-day and weekly date strings
- Add 3 tests for get_date_format in TestGetters
- Update timesheets.example.toml and README with [csv] date_format key
This commit is contained in:
Jef Roosens 2026-05-28 13:19:23 +02:00
parent 0204accd05
commit 8b6f0b24e2
Signed by: Jef Roosens
GPG key ID: 119385BCAA005C21
5 changed files with 29 additions and 3 deletions

View file

@ -100,6 +100,9 @@ map = "/path/to/project_map.json"
[work]
daily_hours = 8.0
weekly_hours = 40.0
[csv]
date_format = "%d/%m/%y" # default; any strftime format string
```
Priority order: **CLI flag > config file > environment variable > default**.