[[deno_std.datetime]]を使う。
## 文字列をDate型に
```ts
import { parse } from "https://deno.land/
[email protected]/datetime/mod.ts";
parse("2023-09-20T20:17:01", "yyyy-MM-ddTHH:mm:ss")
// 2023-09-20T11:17:01.000Z
```
> [!thinking] タイムゾーンは設定できない..? `Z` や `ZZZZZ` でもダメだった。
## Date型を文字列に
```ts
import { format } from "https://deno.land/
[email protected]/datetime/mod.ts";
format(new Date(), "yyyy-MM-dd HH:mm:ss")
// "2023-09-20 20:27:30"
```
> [!thinking] タイムゾーンは設定できない..? `Z` や `ZZZZZ` でもダメだった。