generated at
zod.string().datetime()



引数
引数なしだとUTCのみ許容する
offset: true にするとJTCなど他のタイムゾーンも許容する
ts
const datetime = z.string().datetime(); datetime.parse("2020-01-01T00:00:00Z"); // pass datetime.parse("2020-01-01T00:00:00.123Z"); // pass datetime.parse("2020-01-01T00:00:00.123456Z"); // pass (arbitrary precision) datetime.parse("2020-01-01T00:00:00+02:00"); // fail (no offsets allowed)




precision