Skip to main content
Very Popular
Latest
function default
import { default } from "https://deno.land/x/date_fns@v2.22.1/formatRFC3339/index.js";

Examples

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

// Represent 18 September 2019 in RFC 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 RFC 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