Skip to main content
Module

x/isx/mod.ts>isRfc3339TimeFormat

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

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

import { isRfc3339TimeFormat } from "https://deno.land/x/isx@$VERSION/mod.ts";
import { assertEquals } from "https://deno.land/std@$VERSION/testing/asserts.ts";
assertEquals(isRfc3339TimeFormat("00:00:00+00:00"), true);
assertEquals(isRfc3339TimeFormat("23:59:59Z"), true);
assertEquals(isRfc3339TimeFormat("24:00:00Z"), false);

Parameters

value: string