24 {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
56 int days,
int* year,
int* month,
int* day) {
61 if (new_day >= 1 && new_day <= 28) {
94 bool is_leap = (!yd1 || yd2) && !yd3;
97 DCHECK(is_leap || (days >= 0));
98 DCHECK((days < 365) || (is_leap && (days < 366)));
99 DCHECK(is_leap == ((*year % 4 == 0) && (*year % 100 || (*year % 400 == 0))));
106 if (days >= 31 + 28 + is_leap) {
107 days -= 31 + 28 + is_leap;
109 for (
int i = 2;
i < 12;
i++) {
124 *day = days - 31 + 1;
137 static const int day_from_month[] = {0, 31, 59, 90, 120, 151,
138 181, 212, 243, 273, 304, 334};
139 static const int day_from_month_leap[] = {0, 31, 60, 91, 121, 152,
140 182, 213, 244, 274, 305, 335};
160 static const int year_delta = 399999;
161 static const int base_day = 365 * (1970 + year_delta) +
162 (1970 + year_delta) / 4 -
163 (1970 + year_delta) / 100 +
164 (1970 + year_delta) / 400;
166 int year1 = year + year_delta;
167 int day_from_year = 365 * year1 +
173 if ((year % 4 != 0) || (year % 100 == 0 && year % 400 != 0)) {
174 return day_from_year + day_from_month[month];
176 return day_from_year + day_from_month_leap[month];
183 time_sec <= after_->end_sec) {
202 ?
static_cast<int>(time_ms / 1000)
217 time_sec <= before_->end_sec) {
237 if (time_sec <= before_->end_sec) {
262 if (
before_->
end_sec + kDefaultDSTDeltaInSec <= after_->start_sec) {
284 for (
int i = 4;
i >= 0; --
i) {
290 if (time_sec <= before_->end_sec) {
316 if (
dst_[
i].start_sec <= time_sec) {
320 }
else if (time_sec <
dst_[
i].end_sec) {
329 if (before ==
NULL) {
353 if (&
dst_[
i] == skip)
continue;
static void ClearTimezoneCache(TimezoneCache *cache)
virtual int GetDaylightSavingsOffsetFromOS(int64_t time_sec)
void ExtendTheAfterSegment(int time_sec, int offset_ms)
int DaysFromYearMonth(int year, int month)
DST * LeastRecentlyUsedDST(DST *skip)
int DaylightSavingsOffsetInMs(int64_t time_ms)
void YearMonthDayFromDays(int days, int *year, int *month, int *day)
static const int kInvalidStamp
bool InvalidSegment(DST *segment)
static const int kDefaultDSTDeltaInSec
static const int64_t kMaxEpochTimeInMs
base::TimezoneCache * tz_cache_
static const int kMaxEpochTimeInSec
void ProbeDST(int time_sec)
static const int kInvalidLocalOffsetInMs
static const int kDSTSize
void ClearSegment(DST *segment)
int64_t EquivalentTime(int64_t time_ms)
static const int kMaxValue
static Smi * FromInt(int value)
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define DCHECK(condition)
static const int kDaysOffset
static const char kDaysInMonths[]
static const int kDaysIn4Years
static const int kDaysIn100Years
static const int kDays1970to2000
static const int kYearsOffset
static const int kDaysIn400Years
Debugger support for the V8 JavaScript engine.