/[health_html]/js/DateSelector.js
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /js/DateSelector.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by ravilov, Fri Sep 7 15:07:17 2001 UTC revision 1.3 by ravilov, Tue Sep 25 15:38:04 2001 UTC
# Line 50  function DateSelector(form, date, before Line 50  function DateSelector(form, date, before
50          }          }
51          this.Check = function(d, m, y) {          this.Check = function(d, m, y) {
52                  var n = new Array(31, -1, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);                  var n = new Array(31, -1, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
53                  m = m || (this.sMonth != null && this.sMonth.options.selectedIndex >= 0) ?                  if (!m) m = (this.sMonth != null && this.sMonth.options.selectedIndex >= 0) ?
54                          parseInt(this.sMonth.options[this.sMonth.selectedIndex].value) : this.BaseDate.getMonth() + 1;                          parseInt(this.sMonth.options[this.sMonth.selectedIndex].value) : this.BaseDate.getMonth();
55                  y = y || (this.sYear != null && this.sYear.options.selectedIndex >= 0) ?                  if (!y) y = (this.sYear != null && this.sYear.options.selectedIndex >= 0) ?
56                          parseInt(this.sYear.options[this.sYear.selectedIndex].text) : this.BaseDate.getYear();                          parseInt(this.sYear.options[this.sYear.selectedIndex].text) : this.BaseDate.getYear();
57                  if (y < 1900) y += 1900;                  if (y < 1900) y += 1900;
58                  n[1] = ((y % 4 == 0) && (y % 100 != 0)) ? 29 : 28;                  n[1] = ((y % 4 == 0) && (y % 100 != 0)) ? 29 : 28;
# Line 75  function DateSelector(form, date, before Line 75  function DateSelector(form, date, before
75          }          }
76          this.nDays = null;          this.nDays = null;
77          this.Reset();          this.Reset();
         this.Check();  
78          this.Rebuild();          this.Rebuild();
79          return this;          return this;
80  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.26