DEPRECATED: Timezone-enabled JavaScript Date object. Uses Olson zoneinfo files for timezone data.

Overview

TimezoneJS.Date

Build Status

A timezone-enabled, drop-in replacement for the stock JavaScript Date. The timezoneJS.Date object is API-compatible with JS Date, with the same getter and setter methods -- it should work fine in any code that works with normal JavaScript Dates.

Mailing list

Overview

The timezoneJS.Date object gives you full-blown timezone support, independent from the timezone set on the end-user's machine running the browser. It uses the Olson zoneinfo files for its timezone data.

The constructor function and setter methods use proxy JavaScript Date objects behind the scenes, so you can use strings like '10/22/2006' with the constructor. You also get the same sensible wraparound behavior with numeric parameters (like setting a value of 14 for the month wraps around to the next March).

The other significant difference from the built-in JavaScript Date is that timezoneJS.Date also has named properties that store the values of year, month, date, etc., so it can be directly serialized to JSON and used for data transfer.

Setup

This section shows the most common way of setting up timezone-js. In the 'Customizing' section below you can find alternative approaches.

First you'll need to include the code on your page. Both timezoneJS.Date, and the supporting code it needs in timezoneJS.timezone are bundled in the date.js file in src directory. Include the code on your page with a normal JavaScript script include, like so:

<script type="text/javascript" src="/js/timezone-js/src/date.js">

Next you'll need the Olson time zone files -- timezoneJS.Date uses the raw Olson data to calculate timezone offsets. The Olson region files are simple, structured text data, which download quickly and parse easily. (They also compress to a very small size.)

Here is an example of how to get the Olson time zone files:

##!/bin/bash

# NOTE: Run from your webroot

# Create the /tz directory
mkdir tz

# Download the latest Olson files
curl ftp://ftp.iana.org/tz/tzdata-latest.tar.gz -o tz/tzdata-latest.tar.gz

# Expand the files
tar -xvzf tz/tzdata-latest.tar.gz -C tz

# Optionally, you can remove the downloaded archives.
rm tz/tzdata-latest.tar.gz

Then you'll need to make the files available to the timezoneJS.timezone code, and initialize the code to parse your default region. (This will be North America if you don't change it). No sense in downloading and parsing timezone data for the entire world if you're not going to be using it.

Put your directory of Olson files somewhere under your Web server root, and point timezoneJS.timezone.zoneFileBasePath to it. Then call the init function. Your code will look something like this:

timezoneJS.timezone.zoneFileBasePath = '/tz';
timezoneJS.timezone.init({ callback: cb });

If you use timezoneJS.Date with Fleegix.js, jQuery or jQuery-compatible libraries (like Zepto.js), there's nothing else you need to do -- timezones for North America will be loaded and parsed on initial page load, and others will be downloaded and parsed on-the-fly, as needed. If you want to use this code with some other JavaScript toolkit, you'll need to overwrite your own transport method by setting timezoneJS.timezone.transport = someFunction method. Take a look at test-utils.js in spec for an example.

NOTE: By default init() is async so you'll need to specify a callback function such as init({ callback: cb }). Otherwise set init({ async: false }) to turn off async.

Usage

The timezoneJS.Date constructor is compatible to the normal JavaScript Date constructor, but additional allows to pass an optional tz (timezone). In the following cases the passed date/time is unambiguous:

timezoneJS.Date(millis, [tz])
timezoneJS.Date(Date, [tz])
timezoneJS.Date(dt_str_tz, [tz])

dt_str_tz is a date string containing timezone information, i.e. containing Z, T or a timezone offset matching the regular expression /[+-][0-9]{4}/ (e.g. +0200). The one-stop shop for cross-browser JavaScript Date parsing behavior provides detailed information about JavaScript date formats.

In the following cases the date is assumed to be a date in timezone tz or a locale date if tz is not provided:

timezoneJS.Date(year, mon, day, [hour], [min], [second], [tz])
timezoneJS.Date(dt_str, [tz])

dt_str is a date string containing no timezone information.

Examples

Create a timezoneJS.Date the same way as a normal JavaScript Date, but append a timezone parameter on the end:

var dt = new timezoneJS.Date('10/31/2008', 'America/New_York');
var dt = new timezoneJS.Date(2008, 9, 31, 11, 45, 'America/Los_Angeles');

Naturally enough, the getTimezoneOffset method returns the timezone offset in minutes based on the timezone you set for the date.

// Pre-DST-leap
var dt = new timezoneJS.Date(2006, 9, 29, 1, 59, 'America/Los_Angeles');
dt.getTimezoneOffset(); => 420
// Post-DST-leap
var dt = new timezoneJS.Date(2006, 9, 29, 2, 0, 'America/Los_Angeles');
dt.getTimezoneOffset(); => 480

Just as you'd expect, the getTime method gives you the UTC timestamp for the given date:

var dtA = new timezoneJS.Date(2007, 9, 31, 10, 30, 'America/Los_Angeles');
var dtB = new timezoneJS.Date(2007, 9, 31, 12, 30, 'America/Chicago');
// Same timestamp
dtA.getTime(); => 1193855400000
dtB.getTime(); => 1193855400000

You can set (or reset) the timezone using the setTimezone method:

var dt = new timezoneJS.Date('10/31/2006', 'America/Juneau');
dt.getTimezoneOffset(); => 540
dt.setTimezone('America/Chicago');
dt.getTimezoneOffset(); => 300
dt.setTimezone('Pacific/Honolulu');
dt.getTimezoneOffset(); => 600

The getTimezone method tells you what timezone a timezoneJS.Date is set to:

var dt = new timezoneJS.Date('12/27/2010', 'Asia/Tokyo');
dt.getTimezone(); => 'Asia/Tokyo'

You can use getTimezoneAbbreviation method to get timezone abbreviation:

var dt = new timezoneJS.Date('10/31/2008', 'America/New_York');
dt.getTimezoneAbbreviation(); => 'EDT'

Customizing

If you don't change it, the timezone region that loads on initialization is North America (the Olson 'northamerica' file). To change that to another reqion, set timezoneJS.timezone.defaultZoneFile to your desired region, like so:

timezoneJS.timezone.zoneFileBasePath = '/tz';
timezoneJS.timezone.defaultZoneFile = 'asia';
timezoneJS.timezone.init();

If you want to preload multiple regions, set it to an array, like this:

timezoneJS.timezone.zoneFileBasePath = '/tz';
timezoneJS.timezone.defaultZoneFile = ['asia', 'backward', 'northamerica', 'southamerica'];
timezoneJS.timezone.init();

By default the timezoneJS.Date timezone code lazy-loads the timezone data files, pulling them down and parsing them only as needed.

For example, if you go with the out-of-the-box setup, you'll have all the North American timezones pre-loaded -- but if you were to add a date with a timezone of 'Asia/Seoul,' it would grab the 'asia' Olson file and parse it before calculating the timezone offset for that date.

You can change this behavior by changing the value of timezoneJS.timezone.loadingScheme. The three possible values are:

  1. timezoneJS.timezone.loadingSchemes.PRELOAD_ALL -- this will preload all the timezone data files for all reqions up front. This setting would only make sense if you know your users will be using timezones from all around the world, and you prefer taking the up-front load time to the small on-the-fly lag from lazy loading.
  2. timezoneJS.timezone.loadingSchemes.LAZY_LOAD -- the default. Loads some amount of data up front, then lazy-loads any other needed timezone data as needed.
  3. timezoneJS.timezone.loadingSchemes.MANUAL_LOAD -- Preloads no data, and does no lazy loading. Use this setting if you're loading pre-parsed JSON timezone data.

Ready-made tzdata NPM modules

If you use NPM, and you want to load the time zone data synchronously, you can use one or more of the tzdata* NPM modules. That way, you do not have to download the IANA zone files manually, you can just run npm update to get the latest data.

The tzdata module contains all time zones. There are other modules, e.g. tzdata-northamerica that contain subsets of the zones.

First, install timezone-js and one or more of the tzdata modules.

npm install timezone-js tzdata

Then, initialize timezone-js with the data:

var timezoneJS = require("timezone-js");
var tzdata = require("tzdata");

var _tz = timezoneJS.timezone;
_tz.loadingScheme = _tz.loadingSchemes.MANUAL_LOAD;
_tz.loadZoneDataFromObject(tzdata);

var dt = new timezoneJS.Date(2006, 9, 29, 1, 59, 'America/Los_Angeles');

Pre-Parsed JSON Data

If you know beforehand what specific cities your users are going to be using, you can reduce load times specifically by creating a pre-parsed JSON data file containing only the timezone info for those specific cities.

The src directory contains 2 command-line JavaScript scripts that can generate this kind of JSON data:

  • node-preparse.js: Uses Node to preparse and populate data.
  • preparse.js: This script requires the Rhino (Java) JavaScript engine to run, since the stock SpiderMonkey (C) engine doesn't come with file I/O capabilities.

Use the script like this:

rhino preparse.js zoneFileDirectory [exemplarCities] > outputfile.json

Or:

node node-preparse.js zoneFileDirectory [exemplarCities] > outputfile.json

The first parameter is the directory where the script can find the Olson zoneinfo files. The second (optional) param should be a comma-delimited list of timzeone cities to create the JSON data for. If that parameter isn't passed, the script will generate the JSON data for all the files.

rhino preparse.js olson_files \
"Asia/Tokyo, America/New_York, Europe/London" \
> major_cities.json

rhino preparse.js olson_files > all_cities.json

Or:

node node-preparse.js olson_files \
"Asia/Tokyo, America/New_York, Europe/London" \
> major_cities.json

node node-preparse.js olson_files > all_cities.json

Once you have your file of JSON data, set your loading scheme to timezoneJS.timezone.loadingSchemes.MANUAL_LOAD, and load the JSON data with loadZoneJSONData, like this:

var _tz = timezoneJS.timezone;
_tz.loadingScheme = _tz.loadingSchemes.MANUAL_LOAD;
_tz.loadZoneJSONData('/major_cities.json', true);

Since the limited set of data will be much smaller than any of the zoneinfo files, and the JSON data is deserialized with eval or JSON.parse, this method is significantly faster than the default setup. However, it only works if you know beforehand exactly what timezones you want to use.

Compressing

The Olson timezone data files are simple, space- and linefeed-delimited data. The abundance of whitespace means they compress very, very well.

If you plan to use timezoneJS.Date in a production Web app, it's highly recommended that you first strip the copious comments found in every Olson file, and serve compressed versions of the files to all browsers that can handle it. (Note that IE6 reports itself as able to work with gzipped data, but has numerous problems with it.)

Just to give you an idea of the difference -- merely stripping out the comments from the 'northamerica' file reduces its size by two-thirds -- from 103K to 32K. Gzipping the stripped file reduces it down to 6.5K -- probably smaller than most of the graphics in your app.

The src directory has a sample Ruby script that you can use to strip comments from Olson data files.

Development

This project use Jake to build. In order to see available tasks, do jake -T. The build sequence is:

  • jake test:init: Download and extract tz files to lib/tz.
  • jake test: Run jasmine-node.

Feel free to fork and modify at your own will. The source code is annotated and doc can be generated with jake doc.

License

Copyright 2010 Matthew Eernisse ([email protected]) and Open Source Applications Foundation.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Credits: Ideas included from incomplete JS implementation of Olson parser, "XMLDAte" by Philippe Goetz ([email protected])

Contributions:

Comments
  • Error when using .json file for timezone data

    Error when using .json file for timezone data

    When using a .json file for timezone data instead of a folder generated through the

    node node-preparse.js zoneFileDirectory > outputfile.json
    

    command, I get the following error when setting a timezone

    TypeError: Object 600 has no method 'match'
    at parseTimeString (/Users/mdedetrich/temp/node_modules/timezone-js/src/date.js:449:21)
        at getBasicOffset (/Users/mdedetrich/temp/node_modules/timezone-js/src/date.js:494:17)
        at timezoneJS.timezone.getTzInfo (/Users/mdedetrich/temp/node_modules/timezone-js/src/date.js:855:17)
        at Object.timezoneJS.Date.getTimezoneInfo (/Users/mdedetrich/temp/node_modules/timezone-js/src/date.js:212:35)
        at Object.timezoneJS.Date.getTimezoneOffset (/Users/mdedetrich/temp/node_modules/timezone-js/src/date.js:201:50)
        at Object.timezoneJS.Date.getUTCDateProxy (/Users/mdedetrich/temp/node_modules/timezone-js/src/date.js:331:50)
        at Object.timezoneJS.Date.getUTCMinutes (/Users/mdedetrich/temp/node_modules/timezone-js/src/date.js:227:46)
        at Object.timezoneJS.Date.setTimezone (/Users/mdedetrich/temp/node_modules/timezone-js/src/date.js:358:33)
    

    600 happens to be the timezone for 'Pacific/Honolulu'. It appears that when the JSON file is parsed, timezone-js doesn't appear to convert the objects to a string, they instead remain as objects. Here is the tz.json I am using (that was generated through the above command) https://dl.dropbox.com/u/11630011/tz.json.

    Also this is what my transport function looks like

    timezoneJS.timezone.transport = function(opts) {
      return fs.readFileSync(opts.url, 'utf8');
    };
    

    This is being run on the latest version of node.js

    bug 
    opened by mdedetrich 29
  • Using built-in Date in local time zone as a backend of timezone-js is a fundamental mistake

    Using built-in Date in local time zone as a backend of timezone-js is a fundamental mistake

    Suppose my system timezone is Pacific Time. See this example:

    > new Date(2012,2,11,1,59,0);
    Sun Mar 11 2012 01:59:00 GMT-0800 (PST)
    > new Date(2012,2,11,2,0,0);
    Sun Mar 11 2012 01:00:00 GMT-0800 (PST)
    > new Date(2012,2,11,3,0,0);
    Sun Mar 11 2012 03:00:00 GMT-0700 (PDT)
    

    When using the local timezone, there exists date that simply doesn't exist. Therefore, you shouldn't use the built-in Date in the local timezone as the internal representation of the timezoneJS.Date. However, you are doing this all over your code.

    A solution to this issue is to use the UTC time of the built-in Date to represent the timezoneJS.Date, which is guaranteed to work, as long as we don't take Gregorian cut-off time into consideration.

    I appreciate your work. This indeed is something useful if correct. And it's great that you're willing to help the community and make it available to everyone. However, This issue and issue #36, are both critical enough that warrants immediate fix. Given issue #36 has been outstanding for quite some time, you probably won't have time to fix both bugs any time soon. Currently, when searching for time zone conversion in js on Google, several top results are directing users to try your code here. Therefore, I believe you should put a noticeable warning on this project's main readme to advise any serious user that wants accurate time conversion to avoid using this code and find alternatives.

    opened by haozhun 27
  • Speed considerations in case of changing timezone in a tight loop

    Speed considerations in case of changing timezone in a tight loop

    Let's say I have 500 appointments, each appointment have start and end dates (they are all timezoneJS.Date instances at this point). Now I change timezone using select and want to iterate over each appointment and switch timezone both to start and end dates. Selected timezone is the same for all events.

    Basically:

    var timezone = "SomeTimezone";
    var events = [];
    for (var i=0; i<events.length; i++) {
        var ev = events[i];
        ev.start_date.setTimezone(timezone);
        ev.end_date.setTimezone(timezone);
    }
    

    That happens to be quite slow. Is that expected or are there ways to improve it from my side?

    The most time consuming functions are:

           Name                       Calls     %        Own time
    1. convertRuleToExactDateAndTime  44760   41.56%    1660.881ms
    2. parseTimeString                92502   25.47%    1018.099ms
    3. getZone                        3000    6.44%     257.474ms
    4. compareDates                   31092   6.31%     252.205ms
    5. getRule                        3000    4.32%     172.64ms
    6. findApplicableRules            5778    4.08%     163.247ms
    
    enhancement 
    opened by itsuryev 19
  • Exception occurred when using pre-parsed JSON data with timezone 'Europe/Chisinau' and the date '1969-12-31T16:00:00.000Z'

    Exception occurred when using pre-parsed JSON data with timezone 'Europe/Chisinau' and the date '1969-12-31T16:00:00.000Z'

    TypeError: Cannot read property '6' of null at getAbbreviation (/Users/shenrong/Dropbox/Temporary/timezonetest/node_modules/timezone-js/src/date.js:723:38) at [object Object].getTzInfo (/Users/shenrong/Dropbox/Temporary/timezonetest/node_modules/timezone-js/src/date.js:889:18) at Object.timezoneJS.Date.getTimezoneInfo (/Users/shenrong/Dropbox/Temporary/timezonetest/node_modules/timezone-js/src/date.js:243:33) at Object.timezoneJS.Date.getTimezoneOffset (/Users/shenrong/Dropbox/Temporary/timezonetest/node_modules/timezone-js/src/date.js:234:50)

    opened by jacobbubu 16
  • fix: default format for toString method

    fix: default format for toString method

    Otherwise Date.parse function will not be able to parse the return value of toString on firefox. This also make the behavior consistent with the comment.

    opened by houqp 13
  • Race condition when loading timezone files on the fly

    Race condition when loading timezone files on the fly

    I'm running into a race condition where sometimes the file for a selected timezone doesn't load fast enough and timezoneJS ends up throwing a nasty invalidTZError. It doesn't happen most of the time, but it happens too much to be acceptable for a production environment.

    Looking at a stack trace I see this when it happens:

    invalidTZError() -- date.js (line 575)
    getZone() -- date.js (line 654)
    timezoneJS.timezone</this.getTzInfo() -- date.js (line 1050)
    timezoneJS.Date.prototype.getTimezoneInfo() -- date.js (line 330)
    timezoneJS.Date.prototype.getTimezoneOffset() -- date.js (line 321)
    timezoneJS.Date.prototype.getUTCDateProxy() -- date.js (line 342)
    timezoneJS.Date.prototype.getUTCMinutes() -- date.js (line 313)
    timezoneJS.Date.prototype.setTimezone() -- date.js (line 471)
    

    Glancing at the code, I don't see anything there with a callback that would allow the library to work asynchronously so it can load a file.

    opened by jwarkentin 10
  • Sugestion for improvement: static load of JSON data

    Sugestion for improvement: static load of JSON data

    Hi,

    I'm trying to use this library in my symfony2 project, where I have TWO virtual hosts, host (A) for the website and host (B) for the static contents like js, css, img.

    Since I suppose the timezone json data (generated with node-parse.js) is relatively static, I'd like to put it under host (B). However, since the website is on host (A), I found that either in sync/async mode, it failed to load the json data file. After several struggling, I realized that it is a cross-origin request which is by-default not allowed, unless I set some Apache directive to allow the cross-domain visit.

    Also, I found that "processData()" is a private function in the library which is the core for assign the JSON data into your timezone object. If this function can be reached by the user, I can include the json content, and then pass the json structure into this function. This saves me a request.

    Maybe only I have such a requirement as I'd like to load timezones for all countries beforehand. Pls consider this. Thanks.

    Simon

    opened by minixxie 10
  • HTTP Error 404.3 - Trying to load TZ file

    HTTP Error 404.3 - Trying to load TZ file

    I get the error...

    HTTP Error 404.3 - Not Found The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

    When I 'm trying to load the TZ file. Have a missed a step?

    opened by thomasenns 9
  • timezoneJS.Date()

    timezoneJS.Date()

    Hi,

    I am pretty confused about the below example in the doc since I got different timestamps during testing.

    "var dtA = new timezoneJS.Date(2007, 9, 31, 10, 30, 'America/Los_Angeles'); var dtB = new timezoneJS.Date(2007, 9, 31, 12, 30, 'America/Chicago'); // Same timestamp dtA.getTime(); => 1193855400000 dtB.getTime(); => 1193855400000"

    The timezoneJS.Date(time, timezone)

    This function, in my understanding, should return the date object which indicates the "time" in that "timezone". But in fact, it first initializes a Date based on user browser's time zone and then converts it into the specified "timezone".

    Could someone helps me out?

    Thanks!

    opened by happymap 9
  • Can't load timezone with JQuery.

    Can't load timezone with JQuery.

    I am trying to get this to work with JQuery. I get the following error:

    Uncaught Error: Timezone "America/Chicago" is either incorrect, or not loaded in the timezone registry.
    

    The readme states I would need too create a custom transport method. Could anyone give an example on how I would do this or create a wiki for it. Sorry to create an issue, this has been driving me crazy!

    opened by codefuze 9
  • fix bug with date strings without timezone

    fix bug with date strings without timezone

    Example: document.write(new timezoneJS.Date('05/29/2013 09:25', 'Europe/London')) Expected output independent of client's timezone: 2013-05-29 09:25:00 Output without this fix: [date/time in timezone tz, where dt is interpreted in client's timezone]

    Note: without this fix, it is not possible to get a unix timestamp, if the only available information is a datestring and a timezone string (e.g. 'Europe/London').

    opened by lumbric 8
  • New date formattig algorithm

    New date formattig algorithm

    Add ability to format date like in Java

    1. date literals z, Z, X
    2. escaping
    3. strict mode for non date literals outside escape block By default new formatting is disabled to save compatibility. To enable it call timezoneJS.timezone.init({newFormatting:{enabled:true}})
    opened by stswoon 1
Owner
Matthew Eernisse
Literal rock star developer. JavaScript, music, Japanese, and serial commas. Author and maintainer of EJS.
Matthew Eernisse
Create Persian Calendar as html helper with tag builder c# , and convert selected persian date to gregorian date

Persian-Calendar Use JS,Html,CSS,C# White theme for Persian Calendar , easy to use. Create Persian Calendar as html helper. Use Tag builder in c# for

Tareq Awwad 4 Feb 28, 2022
A date picker web component, and spiritual successor to duet date picker

<date-picker> A date picker web component, based on duet date picker, except authored with Lit and using shadow DOM. This is a work in progress. Todo:

Nick Williams 25 Aug 3, 2022
A lightweight javascript timezone library

Isn't it weird how we can do math in our head, but not date math? how many days until the end of the year? what time was it, 11 hours ago? is it lunch

spencer kelly 3.7k Dec 29, 2022
Timezone support for moment.js

Moment Timezone IANA Time zone support for Moment.js Project Status Moment-Timezone is an add-on for Moment.js. Both are considered legacy projects, n

Moment.js 3.7k Jan 1, 2023
⚡️ Fast parsing, formatting and timezone manipulations for dates

node-cctz CCTZ is a C++ library for translating between absolute and civil times using the rules of a time zone. Install You will need C++11 compatibl

Vsevolod Strukchinsky 59 Oct 3, 2022
⏳ Modern JavaScript date utility library ⌛️

date-fns provides the most comprehensive, yet simple and consistent toolset for manipulating JavaScript dates in a browser & Node.js. ?? Documentation

date-fns 30.6k Dec 29, 2022
🕑 js-joda is an immutable date and time library for JavaScript.

js-joda is an immutable date and time library for JavaScript. It provides a simple, domain-driven and clean API based on the ISO8601 calendar.

null 1.5k Dec 27, 2022
A tiny and fast zero-dependency date-picker built with vanilla Javascript and CSS.

A tiny zero-dependency and framework-agnostic date picker that is incredibly easy to use! Compatible with any web UI framework, vanilla JS projects, and even HTML-only projects!

Nezar 1 Jan 22, 2021
⏰ Day.js 2KB immutable date-time library alternative to Moment.js with the same modern API

English | 简体中文 | 日本語 | Português Brasileiro | 한국어 | Español (España) | Русский Fast 2kB alternative to Moment.js with the same modern API Day.js is a

null 41.7k Dec 28, 2022
Reusable date picker component for React

React DayPicker DayPicker is a reusable date picker component for React. $ npm install react-day-picker@next Beta version ⚠️ This branch is for the ne

Giampaolo Bellavite 4.8k Dec 28, 2022
Date() for humans

date Date is an english language date parser for node.js and the browser. For examples and demos, see: http://matthewmueller.github.io/date/ Update: d

Matthew Mueller 1.5k Jan 4, 2023
:clock8: :hourglass: timeago.js is a tiny(2.0 kb) library used to format date with `*** time ago` statement.

timeago.js timeago.js is a nano library(less than 2 kb) used to format datetime with *** time ago statement. eg: '3 hours ago'. i18n supported. Time a

hustcc 4.9k Jan 4, 2023
Lightweight and simple JS date formatting and parsing

fecha Lightweight date formatting and parsing (~2KB). Meant to replace parsing and formatting functionality of moment.js. NPM npm install fecha --save

Taylor Hakes 2k Jan 5, 2023
A lightweight, locale aware formatter for strings containing unicode date tokens.

Date Token Format A lightweight (~2kB), locale aware formatter for strings containing unicode date tokens. Usage Install the package using: yarn add d

Donovan Hutchinson 1 Dec 24, 2021
CalendarPickerJS - A minimalistic and modern date-picker component/library 🗓️👨🏽‍💻 Written in Vanilla JS

CalendarPickerJS The simple and pretty way to let a user select a day! Supports all major browser. Entirely written in Vanilla JavaScript with no depe

Mathias Picker 15 Dec 6, 2022
⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API

English | 简体中文 | 日本語 | Português Brasileiro | 한국어 | Español (España) | Русский Fast 2kB alternative to Moment.js with the same modern API Day.js is a

null 41.7k Dec 28, 2022
Nepali Date Picker jQuery Plugin 🇳🇵

Nepali Date Picker Nepali Date Picker jQuery Plugin for everyone. ???? Installation npm install nepali-date-picker Demo and Documentation https://leap

Leapfrog Technology 70 Sep 29, 2022
React Native Week Month Date Picker

React Native Week Month Date Picker Date picker with a week and month view Installation npm install react-native-week-month-date-picker Dependencies T

Noona 119 Dec 27, 2022
Easy to get a date.

date2data 테이블에 날짜별 데이터 넣을 때마다 새로 객체 만들어서 작업하기가 매우 귀찮아서 만들었다. moment.js를 쓰기에는 구현하고자 하는 내용이 너무 가벼웠음 Install npm i date2data Usage import {getMonthlyDate

Duho Kim 3 Apr 12, 2022