When entering only three digits, such as 445 to represent 4:45 pm, currently we assume it's the 44:5, with the final 0 missing. This gets formatted to 12:05, 12 being the automatic value to set for any time greater than 24hrs, and 5 being because we had a 5 but no additional 0, so it happens one to the start of the minutes.
The minutes formatting is handled under another issue. This is for 3-digit entries specifically.
Before performing any string manipulation, just check the length. If it equals 3 with no colon (:) or 4 with a colon, assume it's 1 hour digit and 2 minute digits.
This way we format it like so: prefix the hour digit with a zero, assume the minutes are correct as is. At this step there should be 4 digits, or 5 digits if a colon was used, and we can continue with the regular formatting logic as usual.
When entering only three digits, such as 445 to represent 4:45 pm, currently we assume it's the 44:5, with the final 0 missing. This gets formatted to 12:05, 12 being the automatic value to set for any time greater than 24hrs, and 5 being because we had a 5 but no additional 0, so it happens one to the start of the minutes.
The minutes formatting is handled under another issue. This is for 3-digit entries specifically.
Before performing any string manipulation, just check the length. If it equals 3 with no colon (:) or 4 with a colon, assume it's 1 hour digit and 2 minute digits.
This way we format it like so: prefix the hour digit with a zero, assume the minutes are correct as is. At this step there should be 4 digits, or 5 digits if a colon was used, and we can continue with the regular formatting logic as usual.