Hi. I just looked into Deno for the first time (I've been hiding under a rock, I know).
Being the creator of the tz-data and timezonecomplete npm packages, I was drawn toward the datetime standard library and I have two suggestions/questions based on my experience:
Why not use standard LDML format strings for parseDateTime()? The shown format is ambiguous: does 'mm' mean months or minutes? I know, it may be too late now, but maybe there is a way to fit it in.
Supporting time zones in the standard library - or at least, exposing the OS time zone data. The Date class doesn't support time zones; the little bit that it does, it does incorrectly: the ECMAScript specification has a bug in this respect - calculating the UTC offset back and forth will yield incorrect results which are mandated by the spec. Currently, people are working around this by using libraries like moment.js, timezonecomplete etc. The big drawback of these libraries is that they have to include the IANA time zone database data to make it work - a whopping 217 kilobytes. This 217 kilobytes is better stored in the OS or in the Deno runtime. This has the additional benefit that the time zone data is more likely to get periodic updates too.
I'd be happy to assist - or otherwise port my npm packages to deno. But as I've only been looking into Deno for an hour or so, I thought I'd better put this out there and collect some thoughts. Any thoughts?
Welcome @rogierschouten! Regarding point 2, see also issues #1636 and #1698.
Worth noting this stage 2 proposal: https://tc39.es/proposal-temporal/docs/
It might be better waiting for that instead of including something in the standard library.
Date and times are a bit of a rabbit hole. As @dsherret says, temporal is making its way through, because TC39 realises that it is not the best situation at the moment.
Feels like this is something that should start in the community and if it gains enough traction and stabilises, it could move into std, if temporal looks like it is going to stall.
Most helpful comment
Worth noting this stage 2 proposal: https://tc39.es/proposal-temporal/docs/
It might be better waiting for that instead of including something in the standard library.