Development Info

Back to main page

Source Code

You may find the source code in here : Link to source code
You are encouraged to use a javascript editor as the gadget was written in javascript.

Gadget's State Machine

Logged Bugs

IE 6 can not display PNG files
Non vacation holidays such as Hanuka, were displayed with a PNG with an alpha channel. IE 6, doesn't support the use of alpha channel in PNG's causing the calendar to be displayed with an image on the entire cell. This bug was fixed by creating the images in GIF format which also enables the use of alpha channel.

Displayed year in Firefox was X years after 1900
Solely in Firefox, the date was displayed with the year being XXXX-1900. Searching the web for this error we found out that two different functions are available for getting the year from a Date object - Date.getFullYear() & Date.getUTCFullYear(), the latter, returns the full year disregarding the relevance to 1900. (The first function was originally used before the millennium age, for displaying years - 99, 98 etc.)

Three Hebrew months in one Gregorian month
Our algorithm initially seeked the first and last day of the Gregorian month and then calculated which months they each belong to. However, in some cases, three months may appear. We handled this by checking the Hebrew month on the 15th as well as the first and last day of the month.

Hebrew years ending in Yud-Hey/Yud-Vav
Days and years are to be displayed without these sequences and therefore, the function which receives a year and returns it in Hebrew letters was altered so that if the remainder is equal to 15/16 concatenate Tet-Vav/Tet-Zain and return the date in Hebrew letters.

Ending of Hebrew months prior to the beginning of a Gregorian month
When a Hebrew month ends before the Gregorian month begins, the dates keep reoccurring (For example, if the 29th is the "ל" of a specific month, the calendar would have displayed "ל" for all days up to the 1st of the displayed month). This bug occurred since the code had indeed stopped after the end of the Hebrew month, but the calculation was based on the original date and not the current one.

Non-Fixed position of links to next/prior month and next/prior year
The addition of presenting the current months displayed in Hebrew caused the links which were now spanned over two cells to be in a non fixed position which was based on the width of the cell consisting of the text of the Hebrew months. We had fixed this bug using fixed width and fixed height for all title cells.

Firefox converts colours from Hexa format to Decimal
Holidays that are before or beyond the current Gregorian month, have different attributes than those without a special event in them. This is because the gray color in which the dates are displayed appears too soft. We added an "IF" statement, to check whether or not the date outside the current month has a different back color (a special event day) and if so - changed the text color. In Firefox, this did not work properly, and we had to add an "OR" statement to the IF, which checks the background color in Decimal and not Hexa.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License