Skip to main content
Module

x/complaindate/mod.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/mod.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