Git Product home page Git Product logo

datejs's Introduction

DateJS: Evolved

The Javascript Date Library
Build Status NPM version Code Climate

What is it?

DateJS extends the built-in Javascript Date object to add much better parsing, internationalization support, and all the functions and syntactic sugar you could wish for.

Background

Date JS was started by Geoffrey McGill in 2007, he abandoned it on May 13th 2008; leaving the Google Code repository stagnant and with many bugs unresolved.

This fork was started improve and maintain DateJS. To keep what is still the most full featured JavaScript Date library alive, maintained, and improved. Currently we're on track towards a 1.0 release - having fixed almost all the exist bugs and added several new features, improved parsing, and many other changes.

How to Install/Use

DateJS supports running either your regular web browser as a client library or Node.js.

Node.js

Installaltion is as easy as running:

npm install datejs

Web Browser

Support for the Bower package manager is on the roadmap, but is not implemented yet.

International Language Versions

In Node.js you can just call Date.i18n.setLanguage with the IETF appropriate code (e.g. "de-DE", or "es-MX") and DateJS will load the file automatically. For the browser DateJS has langauge support in one of two ways:

  1. Download the appropriate file from the Build directory. Files are named after the IETF code the load (i.e. date-es-MX.js loads Mexican Spanish).
  2. Set Date.Config.i18n to the location of the internationalization files on your server and DateJS will dynamically load the files by script element insersion.

DateJS will always support loading US English via Date.i18n.setLanguage("en-US") no matter what other language is specifically loaded. So you can always support both your localization and the English speaking world.

File Structure

  • build Output from the Grunt powered build process
    • development Non-minfied files with full comments. Suitable for development enviroments.
    • production Fully minified (by Google's Closure Compiler) files suitable for production.
  • src All the source files used to build the final files.
    • core The main DateJS source files.
    • i18n Internationalization files. Language specifics (days of the week, regex formats,etc). Organized by IETF language tag (eg - en-US, etc).
  • specs Unit Tests written using Jasmine. Code coverage is calculated by BlanketJS.
  • tests Orginal unit tests for 2008 project. Deprecated.

datejs's People

Contributors

atus avatar delaguardo avatar goetas avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.