Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/complaindate/utils/splitDateTime.ts>splitDateTime

JavaScript date-time utilities that keeps timezones on the surface
Go to Latest
function splitDateTime
import { splitDateTime } from "https://deno.land/x/complaindate@v0.7.2/utils/splitDateTime.ts";

Get a function curried with a timezone, to split native JS Date objects into separate plain-date and plain-time parts.

Parameters

timezone: string

A named IANA timezone

Returns

(instant?: Date) => [ComPlainDate, ComPlainTime]

A curried function that operates on JS Date objects