Skip to content

rfc3339DateTime

const rfc3339DateTime: RegExp = /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])[Tt ](0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])(\.[0-9]{1,9})?(Z|z|[+-][0-9]{2}:[0-9]{2})$/;
import { rfc3339DateTime } from "@northguild/gmt/regex/rfc-3339";

RFC 3339 §5.6 date-time — the same field grammar as ISO 8601 but with a

rfc3339DateTime.test("60") // false
rfc3339DateTime.test("202") // false

regex/rfc-3339.ts