One of the current limitations listed of Chrono is its lack of support for diverse calendars. Correspondingly, chrono currently lacks strong APIs around calendaring/scheduling, resulting in occassional issues asking for "this or that" new method to be added to existing traits.
As rust's most widely used and supported date and time library, I am hoping that it can provide a robust calendar API.
The chrono README mentions that it has drawn inspiration from a variety of previous work (datetime-rs, rust-datetime, previous research, etc).
There are two libraries that I've worked with in other language that may also be strong examples of previous work that we could use to enhance Chrono.
With respect to multi-calendar support the Objective-C/Swift NSDate and NSCalendar libraries are the most full featured and well supported libraries I've found in any language to handle non-ISO calendars.
With respect to calendar APIs, the fairly new Luxon library has substantially reduced the complexity of calendar and scheduling features I've implemented with far fewer mistakes around handling calendar edge cases.
Useful API examples include beginningOf/endOf APIs as well as "calendar duration" or "calendar period" based Duration math (e.g. difference in round months; this date plus 30 months; etc)
With that introduction, I'm hoping to learn more about the chrono developers thoughts on calendar support and plans for future chrono APIs.
One of the current limitations listed of Chrono is its lack of support for diverse calendars. Correspondingly, chrono currently lacks strong APIs around calendaring/scheduling, resulting in occassional issues asking for "this or that" new method to be added to existing traits.
As rust's most widely used and supported date and time library, I am hoping that it can provide a robust calendar API.
The chrono README mentions that it has drawn inspiration from a variety of previous work (
datetime-rs
,rust-datetime
, previous research, etc).There are two libraries that I've worked with in other language that may also be strong examples of previous work that we could use to enhance Chrono.
With respect to multi-calendar support the Objective-C/Swift NSDate and NSCalendar libraries are the most full featured and well supported libraries I've found in any language to handle non-ISO calendars.
With respect to calendar APIs, the fairly new Luxon library has substantially reduced the complexity of calendar and scheduling features I've implemented with far fewer mistakes around handling calendar edge cases.
beginningOf
/endOf
APIs as well as "calendar duration" or "calendar period" based Duration math (e.g. difference in round months; this date plus 30 months; etc)With that introduction, I'm hoping to learn more about the
chrono
developers thoughts on calendar support and plans for future chrono APIs.