#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/platform/text/date_components.h"
#include <limits.h>
#include "base/notreached.h"
#include "third_party/blink/renderer/platform/wtf/date_math.h"
#include "third_party/blink/renderer/platform/wtf/math_extras.h"
#include "third_party/blink/renderer/platform/wtf/text/ascii_ctype.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
namespace blink {
const int DateComponents::kMinimumWeekNumber = …;
const int DateComponents::kMaximumWeekNumber = …;
static const int kMaximumMonthInMaximumYear = …;
static const int kMaximumDayInMaximumMonth = …;
static const int kMaximumWeekInMaximumYear = …;
static const int kDaysInMonth[12] = …;
static int MaxDayOfMonth(int year, int month) { … }
static int DayOfWeek(int year, int month, int day) { … }
int DateComponents::WeekDay() const { … }
int DateComponents::MaxWeekNumberInYear() const { … }
static unsigned CountDigits(const String& src, unsigned start) { … }
static bool ToInt(const String& src,
unsigned parse_start,
unsigned parse_length,
int& out) { … }
bool DateComponents::ParseYear(const String& src,
unsigned start,
unsigned& end) { … }
static bool WithinHTMLDateLimits(int year, int month) { … }
static bool WithinHTMLDateLimits(int year, int month, int month_day) { … }
static bool WithinHTMLDateLimits(int year,
int month,
int month_day,
int hour,
int minute,
int second,
int millisecond) { … }
bool DateComponents::ParseMonth(const String& src,
unsigned start,
unsigned& end) { … }
bool DateComponents::ParseDate(const String& src,
unsigned start,
unsigned& end) { … }
bool DateComponents::ParseWeek(const String& src,
unsigned start,
unsigned& end) { … }
bool DateComponents::ParseTime(const String& src,
unsigned start,
unsigned& end) { … }
bool DateComponents::ParseDateTimeLocal(const String& src,
unsigned start,
unsigned& end) { … }
static inline double PositiveFmod(double value, double divider) { … }
void DateComponents::SetMillisecondsSinceMidnightInternal(double ms_in_day) { … }
bool DateComponents::SetMillisecondsSinceEpochForDateInternal(double ms) { … }
bool DateComponents::SetMillisecondsSinceEpochForDate(double ms) { … }
bool DateComponents::SetMillisecondsSinceEpochForDateTimeLocal(double ms) { … }
bool DateComponents::SetMillisecondsSinceEpochForMonth(double ms) { … }
bool DateComponents::SetMillisecondsSinceMidnight(double ms) { … }
bool DateComponents::SetMonthsSinceEpoch(double months) { … }
static int OffsetTo1stWeekStart(int year) { … }
bool DateComponents::SetMillisecondsSinceEpochForWeek(double ms) { … }
bool DateComponents::SetWeek(int year, int week_number) { … }
double DateComponents::MillisecondsSinceEpochForTime() const { … }
double DateComponents::MillisecondsSinceEpoch() const { … }
double DateComponents::MonthsSinceEpoch() const { … }
String DateComponents::ToStringForTime(SecondFormat format) const { … }
String DateComponents::ToString(SecondFormat format) const { … }
}