import { formatRFC3339 } from "https://deno.land/x/date_fns@v2.12.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: 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, 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'
// 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'