| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // MM is in the range 01..12, | 55 // MM is in the range 01..12, |
| 56 // DD is in the range 01..31, | 56 // DD is in the range 01..31, |
| 57 // MM and DD defaults to 01 if missing,, | 57 // MM and DD defaults to 01 if missing,, |
| 58 // HH is generally in the range 00..23, but can be 24 if mm, ss | 58 // HH is generally in the range 00..23, but can be 24 if mm, ss |
| 59 // and sss are zero (or missing), representing midnight at the | 59 // and sss are zero (or missing), representing midnight at the |
| 60 // end of a day, | 60 // end of a day, |
| 61 // mm and ss are in the range 00..59, | 61 // mm and ss are in the range 00..59, |
| 62 // sss is in the range 000..999, | 62 // sss is in the range 000..999, |
| 63 // hh is in the range 00..23, | 63 // hh is in the range 00..23, |
| 64 // mm, ss, and sss default to 00 if missing, and | 64 // mm, ss, and sss default to 00 if missing, and |
| 65 // timezone defaults to Z if missing. | 65 // timezone defaults to Z if missing |
| 66 // (following Safari, ISO actually demands local time). |
| 66 // Extensions: | 67 // Extensions: |
| 67 // We also allow sss to have more or less than three digits (but at | 68 // We also allow sss to have more or less than three digits (but at |
| 68 // least one). | 69 // least one). |
| 69 // We allow hh:mm to be specified as hhmm. | 70 // We allow hh:mm to be specified as hhmm. |
| 70 // Legacy dates: | 71 // Legacy dates: |
| 71 // Any unrecognized word before the first number is ignored. | 72 // Any unrecognized word before the first number is ignored. |
| 72 // Parenthesized text is ignored. | 73 // Parenthesized text is ignored. |
| 73 // An unsigned number followed by ':' is a time value, and is | 74 // An unsigned number followed by ':' is a time value, and is |
| 74 // added to the TimeComposer. A number followed by '::' adds a second | 75 // added to the TimeComposer. A number followed by '::' adds a second |
| 75 // zero as well. A number followed by '.' is also a time and must be | 76 // zero as well. A number followed by '.' is also a time and must be |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 // Successfully parsed ES5 Date Time String. Default to UTC if no TZ given. | 325 // Successfully parsed ES5 Date Time String. Default to UTC if no TZ given. |
| 325 if (tz->IsEmpty()) tz->Set(0); | 326 if (tz->IsEmpty()) tz->Set(0); |
| 326 day->set_iso_date(); | 327 day->set_iso_date(); |
| 327 return DateToken::EndOfInput(); | 328 return DateToken::EndOfInput(); |
| 328 } | 329 } |
| 329 | 330 |
| 330 | 331 |
| 331 } } // namespace v8::internal | 332 } } // namespace v8::internal |
| 332 | 333 |
| 333 #endif // V8_DATEPARSER_INL_H_ | 334 #endif // V8_DATEPARSER_INL_H_ |
| OLD | NEW |