refactor: 📝 Switch from ISO 8601 to RFC 3339

This commit is contained in:
Jesse Wierzbinski 2024-10-18 15:00:47 +02:00
parent 6796a31d2b
commit a2c66d5b3a
No known key found for this signature in database
6 changed files with 10 additions and 24 deletions

View file

@ -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