Skip to main content
Module

x/date_fns/index.js>formatRFC3339

date-fns Deno package
Very Popular
Go to Latest
function formatRFC3339
import { formatRFC3339 } from "https://deno.land/x/date_fns@v2.14.0/index.js";

Examples

// Represent 18 September 2019 in ISO 3339 format: const result = formatRFC3339(new Date(2019, 8, 18, 19, 0, 52)) //=> '2019-09-18T19:00:52Z'

// Represent 18 September 2019 in ISO 3339 format, 2 digits of second fraction: const result = formatRFC3339(new Date(2019, 8, 18, 19, 0, 52, 234), { fractionDigits: 2 }) //=> '2019-09-18T19:00:52.23Z'

// Represent 18 September 2019 in ISO 3339 format, 3 digits of second fraction const result = formatRFC3339(new Date(2019, 8, 18, 19, 0, 52, 234), { fractionDigits: 3 }) //=> '2019-09-18T19:00:52.234Z'

Parameters

dirtyDate
  • the original date
dirtyOptions