|
| 1 | +# FAQ |
| 2 | + |
| 3 | +## Why should I use `temporal_rs`? |
| 4 | + |
| 5 | +`temporal_rs` implements the Temporal API in Rust. |
| 6 | + |
| 7 | +The Temporal API is designed to be a calendar and time zone aware |
| 8 | +date/time API. |
| 9 | + |
| 10 | +`temporal_rs` may fit your use case if any of the below are true: |
| 11 | + |
| 12 | +- You are implementing the Temporal API in a JavaScript engine or any |
| 13 | + other language. |
| 14 | +- You have internationalization date/time needs for different calendars |
| 15 | + that do not involve the ISO / propoleptic Gregorian calendar. |
| 16 | +- You really like the JavaScript Temporal built-in and would like to use |
| 17 | + a similar API that you are familiar with. |
| 18 | +- Idk, are you a big ECMA402 fan? Than we might be your jam. |
| 19 | + |
| 20 | +## Why not use `jiff` to implement Temporal? |
| 21 | + |
| 22 | +There are a few reasons why `jiff` was not used for Boa's Temporal |
| 23 | +implementation. |
| 24 | + |
| 25 | +Primary reasons: |
| 26 | + |
| 27 | +- `temporal_rs` is older than `jiff`; so, it was not an option when the |
| 28 | + work on `temporal_rs` began |
| 29 | +- `jiff` is inspired by Temporal, while `temporal_rs` aims to be a 100% |
| 30 | + compliant implementation. `jiff` can break from the specification if |
| 31 | + it would like where `temporal_rs` is bound to the specification |
| 32 | + behavior. |
| 33 | + |
| 34 | +Other concerns: |
| 35 | + |
| 36 | +- Time zones are designed around the concept of BYOP (Bring your own |
| 37 | + provider). This is VERY important for engines to be able to define |
| 38 | + their own time zone providers. |
| 39 | +- Without feature flags, `temporal_rs`'s `Now` does not ship with a |
| 40 | + clock as this is left to JavaScript engines. |
| 41 | +- Calendar support is first class in `temporal_rs`. The library aims to |
| 42 | + support all ECMA402 defined calendars. `jiff` primarily implements the |
| 43 | + ISO calendar with some support for other calendars through `jiff_icu`. |
| 44 | + |
| 45 | +## Why not use other date/time Rust crates `chrono`, `time` and `hifitime`? |
| 46 | + |
| 47 | +These crates provide fantastic APIs for their intended goal, but most |
| 48 | +are designed for use with the propoleptic Gregorian calendar. |
0 commit comments