Datizo-js 2.2 (codename: "The Time Machine")


Datizo-js is a JavaScript Framework to handle dates and perform complex calendrical calculations.

The code is already useable and is almost a complete addon or replacement for the native JavaScript date object: you can verify a date, explode it, get the weekday, get the ISO week number. Expect new cool features to come soon: multiple calendars and multiple languages.

Last page update: 2010-12-06


The code is available from SourceForge.net: click here to download.


If you like this project and want to support it, you can donate to Datizo

The money you give to support this project will be used into buying documents to improve the quality of the code and the accuracy of the computations: calendar books and data tables, ISO docs.


ISO 8601 format
ISO week number calculation
Weekday calculation
Leap seconds support
Timestamps from date (JulianDate, UNIX time, Windows time)
Timezone (offset from UTC)
Timezones (Olson tz database)
ISO 8601:2004 calendar (Gregorian based)
proleptic gregorian calendar (not yet)
Other calendars (planned)
Date custom's output format
Date picker component (not yet)
Unit tests (not complete)
Framework documentation (not complete)


<script type="text/javascript" src="datizo.js"></script>


Code samples

//must be false (out-of-range for ISO calendar)
alert( "1582-10-15".isISO() );

//must be true
alert( "1875-05-20".isISO() );

//must be false (not a leap year)
alert( "1900-02-29".isISO() );

//must be true
alert( "2000-02-29".isISO() );

//must be false (Playstation 3 bugged on this date with famous error code: 8001050F)
alert( "2010-02-29".isISO() );

//must be true
alert( "2012-02-29".isISO() );

//must be false (invalid day)
alert( "9999-12-32".isISO() );

//must be true
alert( "9999-12-31".isISO() );

//must be false (incorrect ISO 8601 format)
alert( "10000-01-01".isISO() );

Outputs demos


This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.