| Index: src/date.js
|
| ===================================================================
|
| --- src/date.js (revision 8618)
|
| +++ src/date.js (working copy)
|
| @@ -981,11 +981,22 @@
|
| function DateToISOString() {
|
| var t = DATE_VALUE(this);
|
| if (NUMBER_IS_NAN(t)) return kInvalidDate;
|
| - return this.getUTCFullYear() +
|
| + var year = this.getUTCFullYear();
|
| + var year_string;
|
| + if (year >= 0 && year <= 9999) {
|
| + year_string = PadInt(year, 4);
|
| + } else {
|
| + if (year < 0) {
|
| + year_string = "-" + PadInt(-year, 6);
|
| + } else {
|
| + year_string = "+" + PadInt(year, 6);
|
| + }
|
| + }
|
| + return year_string +
|
| '-' + PadInt(this.getUTCMonth() + 1, 2) +
|
| - '-' + PadInt(this.getUTCDate(), 2) +
|
| + '-' + PadInt(this.getUTCDate(), 2) +
|
| 'T' + PadInt(this.getUTCHours(), 2) +
|
| - ':' + PadInt(this.getUTCMinutes(), 2) +
|
| + ':' + PadInt(this.getUTCMinutes(), 2) +
|
| ':' + PadInt(this.getUTCSeconds(), 2) +
|
| '.' + PadInt(this.getUTCMilliseconds(), 3) +
|
| 'Z';
|
| @@ -995,8 +1006,8 @@
|
| function DateToJSON(key) {
|
| var o = ToObject(this);
|
| var tv = DefaultNumber(o);
|
| - if (IS_NUMBER(tv) && !NUMBER_IS_FINITE(tv)) {
|
| - return null;
|
| + if (IS_NUMBER(tv) && !NUMBER_IS_FINITE(tv)) {
|
| + return null;
|
| }
|
| return o.toISOString();
|
| }
|
|
|
| Property changes on: src/date.js
|
| ___________________________________________________________________
|
| Modified: svn:mergeinfo
|
| Merged /branches/bleeding_edge/src/date.js:r8061-8597
|
|
|
|
|