Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bigeasy/timezone
Full-blown timezone aware date math and formatting for JavaScript in 2.7k.
https://github.com/bigeasy/timezone
Last synced: 15 days ago
JSON representation
Full-blown timezone aware date math and formatting for JavaScript in 2.7k.
- Host: GitHub
- URL: https://github.com/bigeasy/timezone
- Owner: bigeasy
- License: mit
- Created: 2011-03-10T08:04:02.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2021-08-02T20:58:32.000Z (over 3 years ago)
- Last Synced: 2024-10-14T15:12:32.137Z (about 1 month ago)
- Language: JavaScript
- Homepage: http://bigeasy.github.io/timezone
- Size: 10.3 MB
- Stars: 257
- Watchers: 13
- Forks: 27
- Open Issues: 42
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
# Timezone [![Build Status](https://secure.travis-ci.org/bigeasy/timezone.png?branch=master)](http://travis-ci.org/bigeasy/timezone)
Format time in JavaScript using the IANA time zone database. (Photo: Sundial by
[Wolfgang Staudt](http://www.flickr.com/people/wolfgangstaudt/).)```javascript
var tz = require('timezone/loaded'),
equal = require('assert').equal,
utc;// Get POSIX time in UTC.
utc = tz('2012-01-01');// Convert UTC time to local time in a localize language.
equal(tz(utc, '%c', 'fr_FR', 'America/Montreal'),
'sam. 31 déc. 2011 19:00:00 EST');
```A full-featured time zone aware date formatter for JavaScript.
* **Timezone** is a MicroJS library in pure JavaScript with no dependencies
that provides timezone aware date math and date formatting.
* **Timezone** uses the IANA Database to determine the correct wall clock time
anywhere in the world for any time since the dawn of standardized time.
* **Timezone** formats dates with a full implementation of `strftime` formats,
including the GNU `date` extensions.
* **Timezone** represents time in POSIX time and local time using RFC 3999 date
strings.
* **Timezone** is a full featured standards based time library in pure
JavaScript for under 3K minified and gzipped.## Hacking
```console
$ git clone --quiet https://github.com/bigeasy/timezone.git
$ cd timezone && make && npm install && npm test
```## License
The [MIT License](https://raw.github.com/bigeasy/timezone/master/LICENSE).