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

Examples

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

// Represent 18 September 2019 in ISO 9075, short format: const result = formatISO9075(new Date(2019, 8, 18, 19, 0, 52), { format: 'basic' }) //=> '20190918 190052'

// Represent 18 September 2019 in ISO 9075 format, date only: const result = formatISO9075(new Date(2019, 8, 18, 19, 0, 52), { representation: 'date' }) //=> '2019-09-18'

// Represent 18 September 2019 in ISO 9075 format, time only: const result = formatISO9075(new Date(2019, 8, 18, 19, 0, 52), { representation: 'time' }) //=> '19:00:52'

Parameters

dirtyDate
  • the original date
dirtyOptions