According to the ISO 8601, which is an international standard for date and time representation, the two representations are correct: 24:00 and 00:00. But the W3C defines that the element <input>
of the kind date
shall accept the date in the format specified by RFC 3339, where there is a:
Although ISO 8601 allows the time to be "24", this profile ISO 8601 allows only values between "00" and "23" for the hour, in order to decrease confusion.
Not only does RFC 3339 discourage the "24:00" form - style manuals and military regulations in some countries also discourage use. The manual for the US Navy and the US Marine Corps formally specifies as valid values from 0001 to 2359. (Source)
Although it is possible to make a component that accepts the value 24:00, I do not see much advantage in so much work to format the date in a non-standard format.
Are you using
<input type="date">
or something different? I’m not sure if it has to do with bootstrap– rodorgas
What is the reason for this, because what you do not want is the correct behavior 23:59 after 00:00?
– novic
Both formats are correct, but 00:00 is preferable to 24:00. I will reply based on
<input type="date">
, other components are certainly based on the same Rafts.– rodorgas