Skip to content

Commit

Permalink
Start experimenting in a new folder
Browse files Browse the repository at this point in the history
  • Loading branch information
meduzen committed Apr 27, 2024
1 parent 2393d31 commit 5225558
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/temporal-experimenting/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
> [!INFO]
>
> Work in progress document. Very drafty.
This folder will contain the implementation of `datetime-attribute` where functions will accept [`Temporal`](https://tc39.es/proposal-temporal/docs) objects while keeping current parameters.

It’s possible that some functions will not require to accept a `Temporal` object because what they accomplish is maybe already available as a `Temporal.{className}` feature.

It’s also possible that new functions are created to facilitate the usage of `Temporal` objects, and the extended scope they cover in comparison with `Date`.

## Parity between `Date` and `Temporal` implementations

**Drafty.**

function | in `Date` | in `Temporal` | note
---|---|---|---
`tzOffset` | yes | yes | @todo accept a `Temporal.TimeZone` (or any temporal) and output its “real-world” timezone.
`datetime` | yes | yes | @todo evaluate
`utc` | yes | yes | @todo evaluate
`datetimeTz` | yes | yes | @todo evaluate
`DateTime` | yes | yes | @todo evaluate
`duration` | yes | yes | @todo evaluate
`daysBetween` | yes | yes | @todo evaluate
`weekNumber` | yes | yes | @todo evaluate
(config feature…)| yes | yes | @todo evaluate

## `tzOffset` notes

```js
const tz = new Temporal.TimeZone('-23:59')
console.log(tz.id) // -23:59
```

0 comments on commit 5225558

Please sign in to comment.