adfinis/timed

[BUG]: shorthand time format does not work as expected

Opened this issue · 4 comments

Description

The shorthand military time feature when entering durations is nice, but does not work as expected.

Steps to Reproduce

  1. got to timesheet
  2. fill the mandatory fields for a task
  3. enter 15 as Task duration
  4. receive an error

Expected Behavior

I would expect the following algorithm for the shorthand feature:

  1. All numerical values are padded to four digits with leading zeros
  2. A colon is inserted after the 2nd digit.

I understand that this is probably because 1 expands to 1:00. However, as 100 is already 1:00, I would expect 15 to be 0:15.

In environments, where only 0, 15, 30 and 45 are allowed for the minute part of the duration, additional shorthands for 1 → 1:00, 2 → 2:00, etc. could be added for all single digit inputs.

Attachments

No response

Additional Context

No response

Version

v4.6.0

Required

  • I have checked past issues to see if this bug has already been reported.

15 as task duration doesn't throw an error for me.

additionally the current implementation does what was specified in #168 which states:

e.g. if I type in "730" - it would be auto-formatted into "07:30", or "1615" -> "16:15", "15" would become "15:00".

Therefore 15 -> 15:00 is not a bug.

Okay, sorry. In this case, s/15/30/ "Steps to Reproduce".

Still a bug.

Okay, I get it. Do I have to make an additional request to correct the faulty specification for 15 expanding to 1500?

Should be fine like this