Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE colSpan, Leap Year, sorted month tables fixed #4

Open
GoogleCodeExporter opened this issue Mar 19, 2015 · 0 comments
Open

IE colSpan, Leap Year, sorted month tables fixed #4

GoogleCodeExporter opened this issue Mar 19, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Here is a fix for various issues. As I didn't want to join the project for
just publishing a patch, I'm posting it here.

What's fixed :
 * Leap year
 * IE colSpan
 * Month tables are now sorted

Here is the diff :

98,118c99,101
<   // sorts years and months then displays it
<   var years = new Array();
<   for(var year in globalDateHash) {
<     years[years.length] = year;
<   }
<   years.sort(function (a, b) { return b - a; });
<
<   var year;
<   var month;
<   var months;
<   for (var i = 0; i < years.length; i++) {
<     year = years[i];
<     months = new Array();
<     for (var month in globalDateHash[year]) {
<       months[months.length] = month;
<     }
<     months.sort(function(a, b) { return b - a; });
<
<     for(var j = 0; j < months.length; j++) {
<       month = months[j];
<

---
>
>   for (year in globalDateHash) {
>     for (month in globalDateHash[year]) {
168a152
> // TODO deal with leap year
170,174c154
<   if(month == 2 && (year % 4 == 0) && (year % 100 != 0)) { // deals with
leap year
<     return 29;
<   } else {
<     return monthLength[month - 1];
<   }

---
>   return monthLength[month - 1];
223d202
<   titleTD.colSpan = 7;                                // FIX for IE

Original issue reported on code.google.com by [email protected] on 8 Nov 2007 at 12:34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant