Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/complaindate/utils/splitDateTime.ts>splitDateTime

JavaScript date-time utilities that keep timezones on the surface
Latest
function splitDateTime
import { splitDateTime } from "https://deno.land/x/complaindate@v1.0.1/utils/splitDateTime.ts";

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

If called without Date parameter, the current date in the timezone will be returned.

Parameters

timezone: string

A named IANA timezone

Returns

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

A curried function that operates on JS Date objects