Multiple available formats for timestamp flag #1958
Labels
area/v3
relates to / is being considered for v3
status/triage
maintainers still need to look into this
Checklist
Problem
Hi!
Using lib I found inconvenient moment: only possible time format, but often it is more convenient and intuitive to set time in shortened formats (ex.
1:06PM
instead of '2024-08-06 13:06:00Z').In v3 it can be solved by writing flag using value with custom
Set()
AND this value can be gotten viaCommand.Timestamp()
, unlike in v2, wherecontext.Timestamp()
casts value to concrete type.But I suppose it may be a common problem and it is better to feat this feature into lib instead of solving it locally with custom realizations.
Solution suggestion
I suggest to add multiple available time formats for flag and try to parse given value by each of them until parse is successful.
See details in PR
The text was updated successfully, but these errors were encountered: