Skip to main content
Module

x/isx/strings.ts>isRfc3339DateTimeFormat

TypeScript-first is function collections
Go to Latest
function isRfc3339DateTimeFormat
import { isRfc3339DateTimeFormat } from "https://deno.land/x/isx@1.0.0-beta.24/strings.ts";

Whether the value is RFC 3339 date time format or not. The format compliant with RFC 3339, 5.6. Internet Date/Time Format, date-time

Examples

Example 1

import { isRfc3339DateTimeFormat } from "https://deno.land/x/isx@$VERSION/mod.ts";
import { assertEquals } from "https://deno.land/std@$VERSION/testing/asserts.ts";
assertEquals(isRfc3339DateTimeFormat("0001-01-01T00:00:00Z"), true);
assertEquals(isRfc3339DateTimeFormat("9999-12-31T23:59:59+19:59"), true);
assertEquals(isRfc3339DateTimeFormat("0000-00-00T00:00:00Z"), false);

Parameters

value: string
  • Any string.