Skip to main content
Module

x/isx/strings.ts>isRfc3339DateFormat

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

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

Examples

Example 1

import { isRfc3339DateFormat } from "https://deno.land/x/isx@$VERSION/mod.ts";
import { assertEquals } from "https://deno.land/std@$VERSION/testing/asserts.ts";
assertEquals(isRfc3339DateFormat("0000-01-01"), true);
assertEquals(isRfc3339DateFormat("0000-00-00"), false);

Parameters

value: string
  • Any string.