1 /*global $k*/ 2 3 /** 4 * Constructs a Date from the argument(s), which can be a Date object, undefined, or component values. 5 * If undefined, the current date is returned 6 * 7 * @param [value] Date or year 8 * @param [month] Month number 9 * @param [day] Day number 10 * 11 * @class Represents a date 12 **/ 13 $k.Date = function(varargs) { }; 14 15 /** 16 * Returns true if the values are equal 17 * 18 * @function 19 * @returns {boolean} 20 **/ 21 $k.Date.prototype.equals = function(value) { }; 22 23 /** 24 * Returns the number of the day, e.g. 18 for 2011-03-18 25 * 26 * @function 27 * @returns {number} 28 **/ 29 $k.Date.prototype.getDayNumber = function() { }; 30 31 /** 32 * Returns the number of the month. 33 * Unlike Date.prototype.month(), this is not the 0-based month index, 34 * so for January getMonthNumber() returns 1, not 0 35 * 36 * @function 37 * @returns {number} 38 **/ 39 $k.Date.prototype.getMonthNumber = function() { }; 40 41 /** 42 * Returns the full year 43 * 44 * @function 45 * @returns {number} 46 **/ 47 $k.Date.prototype.getYear = function() { }; 48 49 /** 50 * Returns the latest exact Javascript date that is within the range of this date/time, e.g. 2007-03-01T23:59:59.999 for the date 2007-03-01. 51 * Assumes that this is date/time of the local timezone 52 * 53 * @function 54 * @returns {$k.Date} 55 **/ 56 $k.Date.prototype.maxDate = function() { }; 57 58 /** 59 * Returns the latest exact Javascript date that is within the range of this date/time, e.g. 2007-03-01T23:59:59.999 for the date 2007-03-01. 60 * Assumes that this is date/time of the local timezone 61 * 62 * @function 63 * @returns {$k.Date} 64 **/ 65 $k.Date.prototype.maxUTCDate = function() { }; 66 67 /** 68 * Returns the earliest exact Javascript date that is within the range of this date/time, e.g. 2007-03-01T0:00:00.0 for the date 2007-03-01. 69 * Assumes that this is date/time of the local timezone 70 * 71 * @function 72 * @returns {$k.Date} 73 **/ 74 $k.Date.prototype.minDate = function() { }; 75 76 /** 77 * Returns the earliest exact Javascript date that is within the range of this date/time, e.g. 2007-03-01T0:00:00.0 for the date 2007-03-01. 78 * Assumes that this is an UTC date/time 79 * 80 * @function 81 * @returns {$k.Date} 82 **/ 83 $k.Date.prototype.minUTCDate = function() { }; 84 85 /** 86 * Sets the number of the day, e.g. 23 for 2012-05-23 87 * 88 * @function 89 * @param {number} day 90 **/ 91 $k.Date.prototype.setDayNumber = function(day) { }; 92 93 /** 94 * Set the number of the month. 95 * Unlike Date.prototype.month(), this is not the 0-based month index, 96 * so for January pass 1 to setMonthNumber() , not 0. 97 * 98 * @function 99 * @param {number} month 100 **/ 101 $k.Date.prototype.setMonthNumber = function(month) { }; 102 103 /** 104 * Sets the full year. The year is not modified, so setYear(99) sets the year 99, not 1999. 105 * 106 * @function 107 * @param {number} year 108 **/ 109 $k.Date.prototype.setYear = function(year) { }; 110 111 /** 112 * Returns the date/time as a Javascript date object. 113 * Assumes that this is date/time of the local timezone 114 * 115 * @function 116 **/ 117 $k.Date.prototype.toDate = function() { }; 118 119 /** 120 * Returns a string representing the date/time, similar to Date.prototype.toJSON ( key ) 121 * 122 * @function 123 * @see $k.Date#toJSON 124 **/ 125 $k.Date.prototype.toJSON = function(key) { }; 126 127 /** 128 * Returns the string representation. Equivalent to valueString() 129 * 130 * @function 131 * @param {string} [language] Language of the value. If not defined, the current language will be used. 132 * Ignored if the attribute is not translated 133 * @returns {string} 134 * @throws {$k.exception.InvalidLanguage} If an invalid language was specified 135 **/ 136 $k.Date.prototype.toString = function(language) { }; 137 138 /** 139 * Returns the string representation 140 * 141 * @function 142 * @param {string} [language] Language of the value. If not defined, the current language will be used. 143 * Ignored if the attribute is not translated 144 * @returns {string} 145 * @throws {$k.exception.InvalidLanguage} If an invalid language was specified 146 **/ 147 $k.Date.prototype.valueString = function(language) { }; 148 149 /** 150 * Parse the date/time string. Both ISO 8601 adnd localized strings are supported. 151 * 152 * @function 153 * @param {string} string The string representation 154 * @param {string} [language] Language of the value. If not defined, the current language will be used. 155 * Ignored if the attribute is not translated 156 * @returns The parsed date/time 157 * @throws {$k.exception.InvalidLanguage} If an invalid language was specified 158 **/ 159 $k.Date.parse = function(string, language) { }; 160 161