Lines Matching full:date

266 	var mon = cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];
298 var Y = cal.date.getFullYear() + (fwd ? 1 : -1);
350 var date = null;
352 date = new Date(cal.date);
353 if (mon.month != date.getMonth()) {
354 date.setMonth(mon.month);
355 cal.setDate(date);
362 date = new Date(cal.date);
363 if (year.year != date.getFullYear()) {
364 date.setFullYear(year.year);
365 cal.setDate(date);
430 if (mon.month != cal.date.getMonth()) {
445 if (year.year != cal.date.getFullYear()) {
588 var date = null;
598 cal.date.setDateOnly(el.caldate);
599 date = cal.date;
602 cal._toggleMultipleDate(new Date(date));
605 // a date was clicked
607 cal._init(cal.firstDayOfWeek, date);
614 date = new Date(cal.date);
616 var todayDate = new Date();
617 if(todayDate.print('%Y-%m-%d') == date.print('%Y-%m-%d')) {
622 date.setDateOnly(new Date()); // TODAY
627 // unless "today" was clicked, we assume no date was clicked so
631 var year = date.getFullYear();
632 var mon = date.getMonth();
634 var day = date.getDate();
635 var max = date.getMonthDays(m);
637 date.setDate(max);
639 date.setMonth(m);
660 date.setFullYear(year - 1);
667 date.setFullYear(year);
675 date.setFullYear(year + 1);
681 date.setFullYear(year + 1);
705 cal.getDateStatus(date, date.getFullYear(), date.getMonth(), date.getDate())) {
710 if (!date.equalsTo(cal.date)) {
711 cal.setDate(date);
746 this.date = this.dateStr ? new Date(this.dateStr) : new Date();
883 var hrs = cal.date.getHours();
884 var mins = cal.date.getMinutes();
903 var pm, hrs = this.date.getHours(),
904 mins = this.date.getMinutes();
916 var date = this.date;
924 var d = date.getDate();
925 var m = date.getMonth();
926 var y = date.getFullYear();
927 date.setHours(h);
928 date.setMinutes(parseInt(M.innerHTML, 10));
929 date.setFullYear(y);
930 date.setMonth(m);
931 date.setDate(d);
973 this._init(this.firstDayOfWeek, this.date);
1031 var date = new Date(cal.date);
1032 date.setDate(date.getDate() - step);
1033 cal.setDate(date);
1036 var date = new Date(cal.date);
1037 date.setDate(date.getDate() + step);
1038 cal.setDate(date);
1100 * (RE)Initializes the calendar to the given date and firstDayOfWeek
1102 Calendar.prototype._init = function (firstDayOfWeek, date) { argument
1103 var today = new Date(),
1108 var year = date.getFullYear();
1111 date.setFullYear(year);
1114 date.setFullYear(year);
1117 this.date = new Date(date);
1118 var month = date.getMonth();
1119 var mday = date.getDate();
1120 var no_days = date.getMonthDays();
1125 date.setDate(1);
1126 var day1 = (date.getDay() - this.firstDayOfWeek) % 7;
1129 date.setDate(-day1);
1130 date.setDate(date.getDate() + 1);
1141 cell.innerHTML = date.getWeekNumber();
1146 for (var j = 0; j < 7; ++j, cell = cell.nextSibling, date.setDate(iday + 1)) {
1147 iday = date.getDate();
1148 var wday = date.getDay();
1152 var current_month = (date.getMonth() == month);
1168 cell.innerHTML = this.getDateText ? this.getDateText(date, iday) : iday;
1170 dates[date.print("%Y%m%d")] = cell;
1172 var status = this.getDateStatus(date, year, month, iday);
1183 cell.caldate = new Date(date);
1190 if (date.getFullYear() == TY &&
1191 date.getMonth() == TM &&
1208 // this.tooltips.innerHTML = "Generated in " + ((new Date()) - today) + " ms";
1224 Calendar.prototype._toggleMultipleDate = function(date) { argument
1226 var ds = date.print("%Y%m%d");
1232 this.multiple[ds] = date;
1246 * Calls _init function above for going to a certain date (but only if the
1247 * date is different than the currently selected one).
1249 Calendar.prototype.setDate = function (date) { argument
1250 if (!date.equalsTo(this.date)) {
1251 this._init(this.firstDayOfWeek, date);
1257 * dynamic, meaning that the list of disabled date can change at runtime.
1262 this._init(this.firstDayOfWeek, this.date);
1267 this._init(firstDayOfWeek, this.date);
1273 * parameter must be a function object that receives the date (as a JS Date
1275 * the passed date will be marked as disabled.
1290 this.onSelected(this, this.date.print(this.dateFormat));
1460 /** Customizes the date format. */
1465 /** Customizes the tooltip date format. */
1471 * Tries to identify the date represented in a string. If successful it also
1472 * calls this.setDate which moves the calendar to the given date.
1477 this.setDate(Date.parseDate(str, fmt));
1590 // BEGIN: DATE OBJECT PATCHES
1592 /** Adds the number of days array to the Date object. */
1593 Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
1596 Date.SECOND = 1000 /* milliseconds */;
1597 Date.MINUTE = 60 * Date.SECOND;
1598 Date.HOUR = 60 * Date.MINUTE;
1599 Date.DAY = 24 * Date.HOUR;
1600 Date.WEEK = 7 * Date.DAY;
1603 var j10 = new Date( year,0,10,12,0,0),
1604 j4 = new Date( year,0,4,12,0,0),
1606 return new Date(mon1 + ((wn - 1) * 7 + dayNb) * 86400000);
1609 Date.parseDate = function(str, fmt) {
1610 var today = new Date();
1680 return new Date(y, m, d, hr, min, 0);
1706 return new Date(y, m, d, hr, min, 0);
1711 Date.prototype.getMonthDays = function(month) { class
1719 return Date._MD[month];
1724 Date.prototype.getDayOfYear = function() {
1725 var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
1726 var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0);
1728 return Math.floor(time / Date.DAY);
1732 Date.prototype.getWeekNumber = function() {
1733 var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
1742 /** Checks date and time equality */
1743 Date.prototype.equalsTo = function(date) { argument
1744 return ((this.getFullYear() == date.getFullYear()) &&
1745 (this.getMonth() == date.getMonth()) &&
1746 (this.getDate() == date.getDate()) &&
1747 (this.getHours() == date.getHours()) &&
1748 (this.getMinutes() == date.getMinutes()));
1751 /** Set only the year, month, date parts (keep existing time) */
1752 Date.prototype.setDateOnly = function(date) { argument
1753 var tmp = new Date(date);
1760 /** Prints the date in a string according to the given format. */
1761 Date.prototype.print = function (str) {
1780 // FIXME: %c : preferred date and time representation for the current locale
1784 // FIXME: %D : american date style: %m/%d/%y
1805 // FIXME: %x : preferred date representation for the current locale without the time
1806 // FIXME: %X : preferred time representation for the current locale without the date
1827 Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
1828 Date.prototype.setFullYear = function(y) {
1829 var d = new Date(this);
1836 // END: DATE OBJECT PATCHES