dateWithINATimeZone
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
by default will return a string of date in GMT, offset with WIB timezone.
required argument: date, can be a string, number (Unix timestamp), or Date
instance
optional arguments: timeZone: string (e.g. "Asia/Jakarta"), dateStyle and
timeStyle both take the value of "medium", "full", "long", or "short"
usage:
import { offsetDate } from "https://esm.town/v/foliage/dateWithINATimeZone/main.ts";
const dateInGMT = offsetDate(dateInMyTown);