diff options
Diffstat (limited to 'Source/WebCore/platform/DateComponents.h')
-rw-r--r-- | Source/WebCore/platform/DateComponents.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/WebCore/platform/DateComponents.h b/Source/WebCore/platform/DateComponents.h index fdb268267..b7f6950d9 100644 --- a/Source/WebCore/platform/DateComponents.h +++ b/Source/WebCore/platform/DateComponents.h @@ -159,6 +159,15 @@ public: static inline double maximumTime() { return 86399999; } // 23:59:59.999 static inline double maximumWeek() { return 8639999568000000.0; } // 275760-09-08, the Monday of the week including 275760-09-13. + // HTML5 uses ISO-8601 format with year >= 1. Gregorian calendar started in + // 1582. However, we need to support 0001-01-01 in Gregorian calendar rule. + static inline int minimumYear() { return 1; } + // Date in ECMAScript can't represent dates later than 275760-09-13T00:00Z. + // So, we have the same upper limit in HTML5 date/time types. + static inline int maximumYear() { return 275760; } + static const int minimumWeekNumber; + static const int maximumWeekNumber; + private: // Returns the maximum week number in this DateComponents's year. // The result is either of 52 and 53. |