Public
when you need your local date equivalent to be in GMT
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.

GMTDateFromWIBTimeZone

by default will return a string of date in GMT, offset with WIB timezone.

required argument: date, can be a string or number (Unix timestamp)

optional arguments: dateStyle and timeStyle both take the value of "medium" (default), "full", "long", or "short", offset: string (e.g. "+14")

usage:

import { offsetDate } from "https://esm.town/v/foliage/GMTDateFromWIBTimeZone/main.ts"; const dateInGMT = offsetDate(dateInMyTown);