v8  3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DateCache Class Reference

#include <date.h>

Inheritance diagram for DateCache:

Public Member Functions

 DateCache ()
 
virtual ~DateCache ()
 
void ResetDateCache ()
 
int Weekday (int days)
 
bool IsLeap (int year)
 
int LocalOffsetInMs ()
 
const char * LocalTimezone (int64_t time_ms)
 
int TimezoneOffset (int64_t time_ms)
 
int64_t ToLocal (int64_t time_ms)
 
int64_t ToUTC (int64_t time_ms)
 
int64_t EquivalentTime (int64_t time_ms)
 
int EquivalentYear (int year)
 
void YearMonthDayFromDays (int days, int *year, int *month, int *day)
 
int DaysFromYearMonth (int year, int month)
 
Smistamp ()
 
void * stamp_address ()
 
virtual int GetDaylightSavingsOffsetFromOS (int64_t time_sec)
 
virtual int GetLocalOffsetFromOS ()
 

Static Public Member Functions

static int DaysFromTime (int64_t time_ms)
 
static int TimeInDay (int64_t time_ms, int days)
 

Static Public Attributes

static const int kMsPerMin = 60 * 1000
 
static const int kSecPerDay = 24 * 60 * 60
 
static const int64_t kMsPerDay = kSecPerDay * 1000
 
static const int kMaxEpochTimeInSec = kMaxInt
 
static const int64_t kMaxEpochTimeInMs
 
static const int64_t kMaxTimeInMs
 
static const int64_t kMaxTimeBeforeUTCInMs
 
static const int kInvalidLocalOffsetInMs = kMaxInt
 
static const int kInvalidStamp = -1
 

Detailed Description

Definition at line 39 of file date.h.

Constructor & Destructor Documentation

DateCache ( )
inline

Definition at line 65 of file date.h.

References DateCache::ResetDateCache().

virtual ~DateCache ( )
inlinevirtual

Definition at line 69 of file date.h.

Member Function Documentation

static int DaysFromTime ( int64_t  time_ms)
inlinestatic

Definition at line 77 of file date.h.

References DateCache::kMsPerDay.

Referenced by DateCache::EquivalentTime().

int DaysFromYearMonth ( int  year,
int  month 
)
int64_t EquivalentTime ( int64_t  time_ms)
inline
int EquivalentYear ( int  year)
inline
virtual int GetDaylightSavingsOffsetFromOS ( int64_t  time_sec)
inlinevirtual

Reimplemented in DateCacheMock.

Definition at line 183 of file date.h.

References OS::DaylightSavingsOffset().

virtual int GetLocalOffsetFromOS ( )
inlinevirtual

Reimplemented in DateCacheMock.

Definition at line 188 of file date.h.

References ASSERT, DateCache::kInvalidLocalOffsetInMs, and OS::LocalTimeOffset().

Referenced by DateCache::LocalOffsetInMs().

bool IsLeap ( int  year)
inline

Definition at line 98 of file date.h.

Referenced by DateCache::EquivalentYear().

int LocalOffsetInMs ( )
inline
const char* LocalTimezone ( int64_t  time_ms)
inline
Smi* stamp ( )
inline

Definition at line 179 of file date.h.

void* stamp_address ( )
inline

Definition at line 180 of file date.h.

static int TimeInDay ( int64_t  time_ms,
int  days 
)
inlinestatic

Definition at line 85 of file date.h.

References DateCache::kMsPerDay.

int TimezoneOffset ( int64_t  time_ms)
inline

Definition at line 120 of file date.h.

References DateCache::kMsPerMin, and DateCache::ToLocal().

int64_t ToLocal ( int64_t  time_ms)
inline

Definition at line 126 of file date.h.

References DateCache::LocalOffsetInMs().

Referenced by DateCache::TimezoneOffset().

int64_t ToUTC ( int64_t  time_ms)
inline

Definition at line 131 of file date.h.

References DateCache::LocalOffsetInMs().

Referenced by v8::internal::RUNTIME_FUNCTION().

int Weekday ( int  days)
inline

Definition at line 92 of file date.h.

Referenced by DateCache::EquivalentYear().

void YearMonthDayFromDays ( int  days,
int *  year,
int *  month,
int *  day 
)

Definition at line 77 of file date.cc.

References ASSERT, and DateCache::DaysFromYearMonth().

Referenced by DateCache::EquivalentTime().

Field Documentation

const int kInvalidLocalOffsetInMs = kMaxInt
static
const int kInvalidStamp = -1
static

Definition at line 63 of file date.h.

Referenced by DateCache::ResetDateCache(), and JSDate::SetValue().

const int64_t kMaxEpochTimeInMs
static
Initial value:
=
static_cast<int64_t>(kMaxInt) * 1000

Definition at line 47 of file date.h.

Referenced by DateCache::LocalTimezone().

const int kMaxEpochTimeInSec = kMaxInt
static

Definition at line 46 of file date.h.

const int64_t kMaxTimeBeforeUTCInMs
static
Initial value:

Definition at line 56 of file date.h.

Referenced by v8::internal::RUNTIME_FUNCTION().

const int64_t kMaxTimeInMs
static
Initial value:
=
static_cast<int64_t>(864000000) * 10000000

Definition at line 51 of file date.h.

Referenced by v8::internal::RUNTIME_FUNCTION().

const int64_t kMsPerDay = kSecPerDay * 1000
static
const int kMsPerMin = 60 * 1000
static

Definition at line 41 of file date.h.

Referenced by DateCache::TimezoneOffset().

const int kSecPerDay = 24 * 60 * 60
static

Definition at line 42 of file date.h.


The documentation for this class was generated from the following files: