import { formatISO } from "https://deno.land/x/date_fns@v2.8.0/index.js";
Examples
// Represent 18 September 2019 in ISO 8601 format:
const result = formatISO(new Date(2019, 8, 18, 19, 0, 52))
//=> '2019-09-18T19:00:52'
// Represent 18 September 2019 in ISO 8601 format: const result = formatISO(new Date(2019, 8, 18, 19, 0, 52)) //=> '2019-09-18T19:00:52'
// Represent 18 September 2019 in ISO 8601, short format:
const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { format: 'basic' })
//=> '20190918T190052'
// Represent 18 September 2019 in ISO 8601, short format: const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { format: 'basic' }) //=> '20190918T190052'