Skip to content

Commit efc1467

Browse files
authored
Update the documentation (#680)
Updating the docs based off some feedback that it wasn't clear `temporal_rs` was a Rust date/time library.
1 parent 26403d1 commit efc1467

File tree

3 files changed

+28
-28
lines changed

3 files changed

+28
-28
lines changed

README.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
11
# Temporal in Rust
22

3-
Temporal is a calendar and timezone aware date/time builtin currently
4-
proposed for addition to the ECMAScript specification.
3+
`temporal_rs` is a Rust date/time library that provides support for calendrical
4+
calculations and time zones that is based on the Temporal specification.
55

6-
`temporal_rs` is an implementation of Temporal in Rust that aims to be
7-
100% test compliant. While initially developed for [Boa][boa-repo], the
8-
crate has been externalized and is being used in other engines such as [V8](https://v8.dev) and [Kiesel](https://codeberg.org/kiesel-js/kiesel).
6+
This implementation aims to be 100% test compliant. While initially developed
7+
for [Boa][boa-repo], the crate was split from the engine repository for general
8+
Rust usage and vendoring to other ECMAScript implementations.
99

10-
For more information on `temporal_rs`'s general position in the Rust
11-
date/time library ecoystem, see our [FAQ](./docs/FAQ.md).
10+
For more information on `temporal_rs`'s general position in the Rust date/time
11+
library ecoystem or whether we may address your use case, see our
12+
[FAQ](./docs/FAQ.md).
1213

14+
Currently, `temporal_rs` is used in Boa, [Kiesel](https://codeberg.org/kiesel-js/kiesel),
15+
and [V8](https://v8.dev) for the core functionality of their Temporal built-ins.
1316

14-
Temporal is an API for working with date and time in a calendar
15-
and time zone aware manner.
17+
## Project overview
1618

17-
temporal_rs is designed with ECMAScript implementations and general
18-
purpose Rust usage in mind, meaning that temporal_rs can be used to implement
19-
the Temporal built-ins in an ECMAScript implementation or generally
20-
used as a date and time library in a Rust project.
19+
This project publishes the following crates:
2120

22-
temporal_rs is the primary library for the Temporal API implementation in Boa, Kiesel,
23-
and V8. Each of these engines pass the large ECMAScript conformance test suite for
24-
the specification.
21+
- [`temporal_rs`](https://docs.rs/temporal_rs/latest/temporal_rs/), the core date/time library
22+
- [`temporal_capi`](https://docs.rs/temporal_capi/latest/temporal_capi/), a FFI crate for C and C++
23+
- [`timezone_provider`](https://docs.rs/timezone_provider/latest/timezone_provider/), a time zone data provider crate
24+
- [`zoneinfo_rs`](https://docs.rs/zoneinfo_rs/latest/zoneinfo_rs/), an experimental zoneinfo compiler crate
2525

2626
## Why use temporal_rs?
2727

28-
As previously mentioned, Temporal is an API for working with date and time in
29-
a calendar and time zone aware manner. This means that calendar and time zone support
30-
are first class in Temporal as well as in temporal_rs.
28+
Temporal is a date and time library that is both calendar and time zone aware manner. This
29+
means that calendar and time zone support are first class in Temporal.
3130

3231
For instance, converting between calendars is as simple as providing the calendar as
3332
shown below.
@@ -82,7 +81,7 @@ assert_eq!(zdt_zurich.second(), 10);
8281

8382
```
8483

85-
## Overview
84+
## Library Overview
8685

8786
temporal_rs provides 8 core types for working with date and time. The core types are:
8887

docs/FAQ.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ date/time API.
99

1010
`temporal_rs` may fit your use case if any of the below are true:
1111

12+
- You need some level of web compatibility for your date/time libraries.
1213
- You are implementing the Temporal API in a JavaScript engine or any
1314
other language.
1415
- You have internationalization date/time needs for different calendars
@@ -47,4 +48,4 @@ Other concerns:
4748
These crates provide fantastic APIs for their intended goal, but most
4849
are designed for use with the proleptic Gregorian calendar.
4950

50-
[ecma402-spec]: https://tc39.es/ecma402/
51+
[ecma402-spec]: https://tc39.es/ecma402/

src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
//! A native Rust implementation of ECMAScript's Temporal API.
1+
//! The Rust implementation of ECMAScript's Temporal
22
//!
3-
//! Temporal is an API for working with date and time in a calendar
4-
//! and time zone aware manner.
3+
//! Temporal is date and time library that provides support for calendrical calculations
4+
//! and time zones based on the ECMAScript Temporal specification.
55
//!
6-
//! temporal_rs is designed with ECMAScript implementations and general
7-
//! purpose Rust usage in mind, meaning that temporal_rs can be used to implement
8-
//! the Temporal built-ins in an ECMAScript implementation or generally
9-
//! used as a date and time library in a Rust project.
6+
//! temporal_rs is designed with general purpose Rust usage and ECMAScript implementations
7+
//! in mind, meaning that temporal_rs can be used to implement the Temporal built-ins
8+
//! in an ECMAScript implementation or generally used as a date and time library in a
9+
//! Rust project.
1010
//!
1111
//! temporal_rs is the primary library for the Temporal API implementation in Boa, Kiesel,
1212
//! and V8. Each of these engines pass the large ECMAScript conformance test suite for

0 commit comments

Comments
 (0)