chromium/v8/src/date/date.cc

// Copyright 2012 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "src/date/date.h"

#include <limits>

#include "src/base/overflowing-math.h"
#include "src/date/dateparser-inl.h"
#include "src/numbers/conversions.h"
#include "src/objects/objects-inl.h"
#ifdef V8_INTL_SUPPORT
#include "src/objects/intl-objects.h"
#endif
#include "src/strings/string-stream.h"

namespace v8 {
namespace internal {

static const int kDaysIn4Years =;
static const int kDaysIn100Years =;
static const int kDaysIn400Years =;
static const int kDays1970to2000 =;
static const int kDaysOffset =;
static const int kYearsOffset =;
static const char kDaysInMonths[] =;

DateCache::DateCache()
    :{}

void DateCache::ResetDateCache(
    base::TimezoneCache::TimeZoneDetection time_zone_detection) {}

void DateCache::ClearSegment(DST* segment) {}

void DateCache::YearMonthDayFromDays(int days, int* year, int* month,
                                     int* day) {}

int DateCache::DaysFromYearMonth(int year, int month) {}

void DateCache::BreakDownTime(int64_t time_ms, int* year, int* month, int* day,
                              int* weekday, int* hour, int* min, int* sec,
                              int* ms) {}

// Implements LocalTimeZonedjustment(t, isUTC)
// ECMA 262 - ES#sec-local-time-zone-adjustment
int DateCache::GetLocalOffsetFromOS(int64_t time_ms, bool is_utc) {}

void DateCache::ExtendTheAfterSegment(int time_sec, int offset_ms) {}

int DateCache::DaylightSavingsOffsetInMs(int64_t time_ms) {}

void DateCache::ProbeDST(int time_sec) {}

DateCache::DST* DateCache::LeastRecentlyUsedDST(DST* skip) {}

namespace {

// ES6 section 20.3.1.1 Time Values and Time Range
const double kMinYear =;
const double kMaxYear =;
const double kMinMonth =;
const double kMaxMonth =;

const double kMsPerDay =;

const double kMsPerSecond =;
const double kMsPerMinute =;
const double kMsPerHour =;

}  // namespace

double MakeDate(double day, double time) {}

double MakeDay(double year, double month, double date) {}

double MakeTime(double hour, double min, double sec, double ms) {}

namespace {

const char* kShortWeekDays[] =;
const char* kShortMonths[] =;

template <class... Args>
DateBuffer FormatDate(const char* format, Args... args) {}

}  // namespace

DateBuffer ToDateString(double time_val, DateCache* date_cache,
                        ToDateStringMode mode) {}

// ES6 section 20.3.1.16 Date Time String Format
double ParseDateTimeString(Isolate* isolate, Handle<String> str) {}

}  // namespace internal
}  // namespace v8