Hey all! I'm excited to announce the Roc-IsoDate package! :package: :rocket: This is a Roc package for parsing ISO-8601 Date/Time strings into the Utc type provided by the basic-cli and basic-webserver platforms.
As of today, the package has full support for all ISO standard date, time, and date-time strings. Time intervals are not yet supported, but are the next planned stage in development. If anyone has any thoughts, suggestions, or feedback of any kind, let me know!
It will be nice when platforms can depend on packages directly. Then you won't have to reimplement the opaque utc type.
Instead it will be:
Everything happening with a shared type and single place for updates.
Yeah, that will definitely streamline things a lot! right now we have copies of the Utc code in all 3 repositories, which is definitely less than ideal.
great work @Ian McLerran, this is awesome!!! :smiley:
Added to roc-awesome :heart:
Fantastic, thanks, @Luke Boswell! :star_struck:
It will be nice when platforms can depend on packages directly.
I wasn't aware of this limitation, what's the blocker there?
There's a bug which makes it not possible rn. Should be fixed with module params rewrite.
I thought we had an issue for it, I had a quick look and haven't found it. I thought Agus raised it.
yeah the bug is that in general only applications can depend on packages; there's a compiler crash if non-applications try to do it
Huge thanks to @Aurélien Geron for his work updating the roc-isodate package to the new Roc compiler! I've just released the v0.8.0 release, which now:
Two big updates to roc-isodate to share:
1) Time is now a proper strict time of day, and
2) every type in the library now plays nicely with Roc's well-known methods.
Time is now a strict time of day (breaking)
00:00:00 to 23:59:59.999999999. from_hms, from_hmsn and from_nanos_since_midnight now return a Try, so add a ? or handle the error. If you relied on hours outside 0 to 23, use Duration instead.add_duration_with_day_offset reports the days crossed.24:00:00 and UTC offsets, carrying into the date for a DateTime. Any offset under 24 hours is accepted.Every type now has Roc's well-known methods
to_inspect, so values print as ISO strings like 2024-03-15T09:30:00 and P1DT2H.to_hash and is_eq, so all types work as Dict keys and Set elements.from_quote, so release : Date can be assigned "2024-03-15". Month takes "Mar" or "March".min and max on every type.plus and minus with a Duration on Date, Time and DateTime. Duration gets the full set: plus, minus, negate, times, div_by, abs and default, so durations can be .sum()ed.DateTime.lowest and DateTime.highest.Coming later: JSON encoding and parsing, date iteration, and an ISO 8601 duration parser.
Last updated: Nov 26 2026 at 20:35 UTC