Module

x/date_fns/toDate/index.ts>default

date-fns Deno package
Very Popular
Latest
function default
import { default } from "https://dotland.deno.dev/x/date_fns@v2.22.1/toDate/index.ts";

Examples

// Clone the date: const result = toDate(new Date(2014, 1, 11, 11, 30, 30)) //=> Tue Feb 11 2014 11:30:30

// Convert the timestamp to date: const result = toDate(1392098430000) //=> Tue Feb 11 2014 11:30:30

Parameters

argument: Date | number
  • the value to convert

Returns

the parsed date in the local time zone