gregor.js
gregor.js is a JavaScript library for calculations with gregorian dates and display of calendar sheets using DHTML. It can be used to:
- Create a calendar using DHTML
- Create rich form fields for date selection within an HTML page
(automatic pop-up for date selection) - Calculate the amount of days between two dates
- Add or substract an amount of days to/from a given date
- Calculate the day of week of a given date
- Calculate the week-number in the year of a given date
- according to ISO-8601
(Week starts with Monday, first week contains January 4th) - according to the commonly used system in the USA
(Week starts with Sunday, first week contains January 1st)
- according to ISO-8601
- Calculate the date of a given year, week-number and day of week
Tested with:
- Mozilla Firefox 3 / 3.5
- Konqueror (KDE 4)
- Safari 4
- Microsoft Internet Explorer 8
- Microsoft Internet Explorer 7
- Microsoft Internet Explorer 6
gregor.js is available under the terms of the MIT-License. Feel free to use it in your own open source project or to incorporate it into a commercial software product.
Download
Demonstration
- Example 1:
Single calendar sheet with navigation and possiblity to select a date - Example 2:
Calendar sheet making use of the day_callback function to fill the date cells - Example 3:
Rich form fields with pop-up
Documentation
Documentation on how to use the library can be found in the source file gregor.js.
Changes
- 2009-08-18
- Initial release
