-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smart Time entry doesn't seem to handle 12-hour time entries for hours ≥10 without a space #994
Comments
Thank you @lukestein, The smart time entry feature aims to allow some shorthand on time input. I am happy to fix this as it seems a simple cleanup job, but I am not sure what is the standard to aim for here. I was wondering if you would have some opinions on what are the reasonable expectations for a string that contains am/pm?
We have a few tests locking in this part of the feature |
I've got a fix for "standard" am/pm formats i.e 10a, 10pm, 12:01am, 9:12pm, etc. And tests that test that all strings between 1 and 12:59:59 parse right with either a/am/p/pm after them with and without a space. |
I am happy to try to do a bit of thinking, but my baseline thought here (as a user, not a developer) is that what's important is to give expected output with expected input. Obviously the code has to make a decision about what to do with unexpected input, but imho it's not critical to decide what to do with an entry like Hopefully @jwetzell and #998 have us covered.
|
I will have to double check on the space between hour/minutes which I am fairly certain is handled as there are a couple valid "separators" other than a colon, but other than that #998 handles all these cases now. |
Installation: v3.0.3 via Docker (Synology NAS)
Times with "a", "am", "p", or "pm" exhibit some strange behavior. I think there is no smart time entry documentation on 12 hour times, but some things work and some things… don't.
For example:
9a
,9am
,9 a
,9 am
,9p
,9pm
,9 p
,9 pm
all parse as expected:09:00:00
or21:00:00
10 a
,10 am
,10 p
,10 pm
all parse as expected:10:00:00
or22:00:00
10a
,10am
,10p
,10pm
(no space) do not parseThe text was updated successfully, but these errors were encountered: