48 static_cast<int64_t
>(
kMaxInt) * 1000;
52 static_cast<int64_t
>(864000000) * 10000000;
65 DateCache() : stamp_(0), tz_cache_(
OS::CreateTimezoneCache()) {
81 if (time_ms < 0) time_ms -= (
kMsPerDay - 1);
82 return static_cast<int>(time_ms /
kMsPerDay);
89 return static_cast<int>(time_ms - days *
kMsPerDay);
96 int result = (days + 4) % 7;
97 return result >= 0 ? result : result + 7;
102 return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);
111 return local_offset_ms_;
124 int64_t local_ms =
ToLocal(time_ms);
125 return static_cast<int>((time_ms - local_ms) /
kMsPerMin);
130 return time_ms +
LocalOffsetInMs() + DaylightSavingsOffsetInMs(time_ms);
136 return time_ms - DaylightSavingsOffsetInMs(time_ms);
151 int time_within_day_ms =
static_cast<int>(time_ms - days *
kMsPerDay);
152 int year, month, day;
155 return static_cast<int64_t
>(new_days) *
kMsPerDay + time_within_day_ms;
164 int recent_year = (
IsLeap(year) ? 1956 : 1967) + (week_day * 12) % 28;
167 return 2008 + (recent_year + 3 * 28 - 2008) % 28;
187 double time_ms =
static_cast<double>(time_sec * 1000);
194 return static_cast<int>(offset);
203 static const int kDefaultDSTDeltaInSec = 19 *
kSecPerDay;
206 static const int kDSTSize = 32;
219 int DaylightSavingsOffsetInMs(int64_t time_ms);
226 void ProbeDST(
int time_sec);
230 DST* LeastRecentlyUsedDST(DST* skip);
234 inline void ExtendTheAfterSegment(
int time_sec,
int offset_ms);
237 inline void ClearSegment(DST* segment);
239 bool InvalidSegment(DST* segment) {
240 return segment->start_sec > segment->end_sec;
247 int dst_usage_counter_;
251 int local_offset_ms_;
260 TimezoneCache* tz_cache_;
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter NULL
int64_t ToUTC(int64_t time_ms)
static const int kSecPerDay
static double DaylightSavingsOffset(double time, TimezoneCache *cache)
static const int64_t kMaxTimeBeforeUTCInMs
static const int64_t kMaxEpochTimeInMs
#define ASSERT(condition)
static const int kInvalidStamp
virtual int GetLocalOffsetFromOS()
const char * LocalTimezone(int64_t time_ms)
int TimezoneOffset(int64_t time_ms)
static const int64_t kMaxTimeInMs
static const int kMaxEpochTimeInSec
static int TimeInDay(int64_t time_ms, int days)
virtual int GetDaylightSavingsOffsetFromOS(int64_t time_sec)
static const int kInvalidLocalOffsetInMs
int DaysFromYearMonth(int year, int month)
static const int64_t kMsPerDay
static const char * LocalTimezone(double time, TimezoneCache *cache)
static const int kMsPerMin
static void DisposeTimezoneCache(TimezoneCache *cache)
void YearMonthDayFromDays(int days, int *year, int *month, int *day)
int EquivalentYear(int year)
static int DaysFromTime(int64_t time_ms)
int64_t EquivalentTime(int64_t time_ms)
static double LocalTimeOffset(TimezoneCache *cache)
int64_t ToLocal(int64_t time_ms)