#temporal #api #proposal #language #date-times #tc39

rust_temporal

Temporal API for working with date-times

1 unstable release

0.1.0 Aug 5, 2023

#25 in #temporal

ISC license

2KB

Temporal

NOTE: Just use the chrono crate instead. This crate hasn't been done and the idea is dead, since the goal was just to support an API similiar to temporal, which may have no benefit compared to chrono.

Work with date-times using a called temporal API. It is based on a TC39 proposal. Cross-platform and designed for the Rust language.

Roadmap

Roadmap list
  • Optional browser support by passing a browser_support feature.
  • References
  • Create a crate for gathering data from IANA timezone database.
  • Start and finish the ambiguity documentation in docs/ambiguity.rs
  • There are a few documentation pages in addition to ambiguity too; just iterate the TC39 Temporal API docs. Add all the home sections too to summarize the API and the Other documentation section.
  • Fully document the public API according to the TC39 proposal
  • temporal::now
    • instant
    • timezone_id
    • zoned_date_time
    • zoned_date_time_iso
    • plain_date
    • plain_date_iso
    • plain_time_iso
    • plain_date_time
    • plain_date_time_iso
  • Types with addition and subtraction also implement (Add|Sub)Assign (+= and -=)
  • temporal::Instant
  • temporal::ZonedDateTime
    • Can be constructed with an options object. Implement Default for it.
  • temporal::PlainDate
  • temporal::PlainTime
  • temporal::PlainDateTime
  • temporal::PlainYearMonth
  • temporal::PlainMonthDay
  • temporal::Duration
    • Constructed via methods such as Duration::from_milliseconds() and things can be accessed like years().
  • temporal::TimeZone
    • Consider implementing the Display trait
  • temporal::Calendar
  • Implement Display for every type

No runtime deps

Features