Remix.run Logo
kriops 5 days 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 5 days ago | parent [-]

Those 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 5 days ago | parent [-]

ISO 8601 is the way.

homebrewer 5 days ago | parent | next [-]

You must mean RFC 3339.

https://ijmacd.github.io/rfc3339-iso8601/

bobmcnamara 5 days ago | parent [-]

Out blasphemous temporal demon! Out!

tshaddox 5 days ago | parent | prev | next [-]

Yes, 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.

cyanydeez 5 days ago | parent | prev [-]

alas, the user doesnt know the way...

PaulHoule 5 days ago | parent [-]

That part is easy. Use a date picker of some kind

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.