Skip to main content
Module

x/date_fns/index.js>formatISO9075

date-fns Deno package
Very Popular
Go to Latest
function formatISO9075
import { formatISO9075 } from "https://deno.land/x/date_fns@v2.10.0/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