mirror of
https://github.com/versia-pub/docs.git
synced 2026-03-13 02:49:16 +01:00
refactor: 📝 Switch from ISO 8601 to RFC 3339
This commit is contained in:
parent
6796a31d2b
commit
a2c66d5b3a
6 changed files with 10 additions and 24 deletions
|
|
@ -1,23 +1,7 @@
|
|||
|
||||
## ISO8601
|
||||
## RFC3339
|
||||
|
||||
```typescript
|
||||
type Year = `${number}${number}${number}${number}`;
|
||||
type Month = `${"0" | "1"}${number}`;
|
||||
type Day = `${"0" | "1" | "2" | "3"}${number}`;
|
||||
|
||||
type DateString = `${Year}-${Month}-${Day}`;
|
||||
|
||||
type Hour = `${"0" | "1" | "2"}${number}`;
|
||||
type Minute = `${"0" | "1" | "2" | "3" | "4" | "5"}${number}`;
|
||||
type Second = `${"0" | "1" | "2" | "3" | "4" | "5"}${number}`;
|
||||
|
||||
type TimeString = `${Hour}:${Minute}:${Second}`;
|
||||
|
||||
type Offset = `${"Z" | "+" | "-"}${Hour}:${Minute}`;
|
||||
|
||||
type ISO8601 = `${DateString}T${TimeString}${Offset}`;
|
||||
```
|
||||
[https://datatracker.ietf.org/doc/html/rfc3339](https://datatracker.ietf.org/doc/html/rfc3339)
|
||||
|
||||
## UUID
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue