dominikbraun / timetrace

A simple CLI for tracking your working time.
Apache License 2.0
685 stars 76 forks source link

Make command argument syntax sensitive for configuration #17

Closed dominikbraun closed 3 years ago

dominikbraun commented 3 years ago

For example, the get record command has the following syntax:

https://github.com/dominikbraun/timetrace/blob/16b10a97b594a7e73145096e84b6fb9672048df2/cli/get.go#L53-L56

Actually, YYYY-MM-DD-HH-MM is only the default syntax. If the user has set use12hours: true in their config, the expected format is YYYY-MM-DD-HH-MMPM instead, as you can see here:

https://github.com/dominikbraun/timetrace/blob/16b10a97b594a7e73145096e84b6fb9672048df2/cli/get.go#L58-L62

The Use field of the command should be changed accordingly, being sensitive to the actual configuration.

dominikbraun commented 3 years ago

Resolved by 54.