5 ms·
Furthermore, require dashes over slashes to signal that you are expecting ISO-8601 compatible dates, i.e., YYYY-MM-DD. Most users does not know the standard eve
by kriops 1y ago
Furthermore, require dashes over slashes to signal that you are expecting ISO-8601 compatible dates, i.e., YYYY-MM-DD. Most users does not know the standard even exists, but it serves as an affordance that it is different from dd/mm/yyyy, etc.
- PaulHoule 1y agoThose ISO-8601 dates are great for date processing with primitive tools such as GNU sort or awk since they sort lexically, at least if you're not comparing dates in different time zones.
- titzer 1y agoISO 8601 is the way.
- cyanydeez 1y agoalas, the user doesnt know the way...
- PaulHoule 1y agoThat part is easy. Use a date picker of some kind https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/date https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/... or a text field with some code that converts vernacular dates to a structured format. I don't think users are going to be too weirded out at seeing "1997-04-15" and will probably learn to use that natively. The hard part is that a lot of devs aren't aware that there's a standard and that standard is superior to the alternatives.
- homebrewer 1y agoYou must mean RFC 3339. https://ijmacd.github.io/rfc3339-iso8601/ https://ijmacd.github.io/rfc3339-iso8601/
- bobmcnamara 1y agoOut blasphemous temporal demon! Out!
- tshaddox 1y agoYes, except for all the completely unhinged stuff in ISO 8601. You probably do not want to deal with durations, or repeating intervals, or even week dates and ordinal dates.