Lines Matching refs:month
62 int64 SecondsPerMonth(int month, bool leap) { in SecondsPerMonth() argument
63 if (month == 2 && leap) { in SecondsPerMonth()
64 return kSecondsPerDay * (kDaysInMonth[month] + 1); in SecondsPerMonth()
66 return kSecondsPerDay * kDaysInMonth[month]; in SecondsPerMonth()
75 time.month < 1 || time.month > 12 || in ValidateDateTime()
82 if (time.month == 2 && IsLeapYear(time.year)) { in ValidateDateTime()
83 return time.month <= kDaysInMonth[time.month] + 1; in ValidateDateTime()
85 return time.month <= kDaysInMonth[time.month]; in ValidateDateTime()
114 assert(time.month >= 1 && time.month <= 12); in SecondsSinceCommonEra()
115 int month = time.month; in SecondsSinceCommonEra() local
116 result += kSecondsPerDay * kDaysSinceJan[month]; in SecondsSinceCommonEra()
117 if (month > 2 && IsLeapYear(year)) { in SecondsSinceCommonEra()
121 time.day <= (month == 2 && IsLeapYear(year) in SecondsSinceCommonEra()
122 ? kDaysInMonth[month] + 1 in SecondsSinceCommonEra()
123 : kDaysInMonth[month])); in SecondsSinceCommonEra()
236 int month = 1; in SecondsToDateTime() local
237 while (seconds >= SecondsPerMonth(month, leap)) { in SecondsToDateTime()
238 seconds -= SecondsPerMonth(month, leap); in SecondsToDateTime()
239 ++month; in SecondsToDateTime()
248 time->month = month; in SecondsToDateTime()
277 time.year, time.month, time.day, in FormatTime()
299 if ((data = ParseInt(data, 2, 1, 12, &time.month)) == NULL) { in ParseTime()