Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

lightFormat

import { lightFormat } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
const result = lightFormat(new Date(2014, 1, 11), 'yyyy-MM-dd')
//=> '2014-02-11'
function lightFormat<DateType extends Date>(date: DateType | number | string, formatStr: string): string;
§
lightFormat<DateType extends Date>(date: DateType | number | string, formatStr: string): string
[src]

§Type Parameters

§
DateType extends Date
[src]

§Parameters

§
date: DateType | number | string
[src]
  • The original date
§
formatStr: string
[src]

§Return Type

§
string
[src]

The formatted date string