Home
last modified time | relevance | path

Searched refs:year (Results 1 – 25 of 2143) sorted by relevance

12345678910>>...86

/external/llvm-project/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/
Dok.pass.cpp24 using year = std::chrono::year; in main() typedef
34 static_assert(!year_month_day{year{-32768}, month{}, day{}}.ok(), ""); // All three bad in main()
36 static_assert(!year_month_day{year{-32768}, January, day{1}}.ok(), ""); // Bad year in main()
37 static_assert(!year_month_day{year{2019}, month{}, day{1}}.ok(), ""); // Bad month in main()
38 static_assert(!year_month_day{year{2019}, January, day{} }.ok(), ""); // Bad day in main()
40 static_assert(!year_month_day{year{-32768}, month{}, day{1}}.ok(), ""); // Bad year & month in main()
41 static_assert(!year_month_day{year{2019}, month{}, day{} }.ok(), ""); // Bad month & day in main()
42 static_assert(!year_month_day{year{-32768}, January, day{} }.ok(), ""); // Bad year & day in main()
44 static_assert( year_month_day{year{2019}, January, day{1}}.ok(), ""); // All OK in main()
47 static_assert( year_month_day{year{2020}, month{ 1}, day{31}}.ok(), ""); in main()
[all …]
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/
Dok.pass.cpp25 using year = std::chrono::year; in main() typedef
35 static_assert(!year_month_day{year{-32768}, month{}, day{}}.ok(), ""); // All three bad in main()
37 static_assert(!year_month_day{year{-32768}, January, day{1}}.ok(), ""); // Bad year in main()
38 static_assert(!year_month_day{year{2019}, month{}, day{1}}.ok(), ""); // Bad month in main()
39 static_assert(!year_month_day{year{2019}, January, day{} }.ok(), ""); // Bad day in main()
41 static_assert(!year_month_day{year{-32768}, month{}, day{1}}.ok(), ""); // Bad year & month in main()
42 static_assert(!year_month_day{year{2019}, month{}, day{} }.ok(), ""); // Bad month & day in main()
43 static_assert(!year_month_day{year{-32768}, January, day{} }.ok(), ""); // Bad year & day in main()
45 static_assert( year_month_day{year{2019}, January, day{1}}.ok(), ""); // All OK in main()
48 static_assert( year_month_day{year{2020}, month{ 1}, day{31}}.ok(), ""); in main()
[all …]
/external/llvm-project/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/
Dis_leap.pass.cpp25 using year = std::chrono::year; in main() typedef
27 ASSERT_NOEXCEPT( year(1).is_leap()); in main()
28 ASSERT_SAME_TYPE(bool, decltype(year(1).is_leap())); in main()
30 static_assert(!year{1}.is_leap(), ""); in main()
31 static_assert(!year{2}.is_leap(), ""); in main()
32 static_assert(!year{3}.is_leap(), ""); in main()
33 static_assert( year{4}.is_leap(), ""); in main()
35 assert( year{-2000}.is_leap()); in main()
36 assert( year{ -400}.is_leap()); in main()
37 assert(!year{ -300}.is_leap()); in main()
[all …]
Dok.pass.cpp29 using year = std::chrono::year; in main() typedef
31 ASSERT_NOEXCEPT( std::declval<const year>().ok()); in main()
32 ASSERT_SAME_TYPE(bool, decltype(std::declval<const year>().ok())); in main()
34 ASSERT_NOEXCEPT( year::max()); in main()
35 ASSERT_SAME_TYPE(year, decltype(year::max())); in main()
37 ASSERT_NOEXCEPT( year::min()); in main()
38 ASSERT_SAME_TYPE(year, decltype(year::min())); in main()
40 static_assert(static_cast<int>(year::min()) == -32767, ""); in main()
41 static_assert(static_cast<int>(year::max()) == 32767, ""); in main()
43 assert(year{-20001}.ok()); in main()
[all …]
/external/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/
Dis_leap.pass.cpp26 using year = std::chrono::year; in main() typedef
28 ASSERT_NOEXCEPT( year(1).is_leap()); in main()
29 ASSERT_SAME_TYPE(bool, decltype(year(1).is_leap())); in main()
31 static_assert(!year{1}.is_leap(), ""); in main()
32 static_assert(!year{2}.is_leap(), ""); in main()
33 static_assert(!year{3}.is_leap(), ""); in main()
34 static_assert( year{4}.is_leap(), ""); in main()
36 assert( year{-2000}.is_leap()); in main()
37 assert( year{ -400}.is_leap()); in main()
38 assert(!year{ -300}.is_leap()); in main()
[all …]
Dok.pass.cpp30 using year = std::chrono::year; in main() typedef
32 ASSERT_NOEXCEPT( std::declval<const year>().ok()); in main()
33 ASSERT_SAME_TYPE(bool, decltype(std::declval<const year>().ok())); in main()
35 ASSERT_NOEXCEPT( year::max()); in main()
36 ASSERT_SAME_TYPE(year, decltype(year::max())); in main()
38 ASSERT_NOEXCEPT( year::min()); in main()
39 ASSERT_SAME_TYPE(year, decltype(year::min())); in main()
41 static_assert(static_cast<int>(year::min()) == -32767, ""); in main()
42 static_assert(static_cast<int>(year::max()) == 32767, ""); in main()
44 assert(year{-20001}.ok()); in main()
[all …]
Ddecrement.pass.cpp36 using year = std::chrono::year; in main() typedef
37 ASSERT_NOEXCEPT(--(std::declval<year&>()) ); in main()
38 ASSERT_NOEXCEPT( (std::declval<year&>())--); in main()
40 ASSERT_SAME_TYPE(year , decltype( std::declval<year&>()--)); in main()
41 ASSERT_SAME_TYPE(year&, decltype(--std::declval<year&>() )); in main()
43 static_assert(testConstexpr<year>(), ""); in main()
47 year year(i); in main() local
48 assert(static_cast<int>(--year) == i - 1); in main()
49 assert(static_cast<int>(year--) == i - 1); in main()
50 assert(static_cast<int>(year) == i - 2); in main()
/external/protobuf/src/google/protobuf/stubs/
Dtime.cc29 int64 SecondsPer100Years(int year) { in SecondsPer100Years() argument
30 if (year % 400 == 0 || year % 400 > 300) { in SecondsPer100Years()
39 int64 SecondsPer4Years(int year) { in SecondsPer4Years() argument
40 if ((year % 100 == 0 || year % 100 > 96) && in SecondsPer4Years()
41 !(year % 400 == 0 || year % 400 > 396)) { in SecondsPer4Years()
50 bool IsLeapYear(int year) { in IsLeapYear() argument
51 return year % 400 == 0 || (year % 4 == 0 && year % 100 != 0); in IsLeapYear()
54 int64 SecondsPerYear(int year) { in SecondsPerYear() argument
55 return kSecondsPerDay * (IsLeapYear(year) ? 366 : 365); in SecondsPerYear()
74 if (time.year < 1 || time.year > 9999 || in ValidateDateTime()
[all …]
/external/libcxx/test/std/utilities/time/time.cal/time.cal.operators/
Dyear_month_day_last.pass.cpp46 using year = std::chrono::year; in main() typedef
54 constexpr year_month Feb2018{year{2018}, February}; in main()
59 static_assert((Feb2018/last).year() == year{2018}, ""); in main()
65 year y{i}; in main()
68 assert(ymdl.year() == y); in main()
75 ASSERT_NOEXCEPT ( year{2018}/month_day_last{February}); in main()
76 ASSERT_SAME_TYPE(year_month_day_last, decltype(year{2018}/month_day_last{February})); in main()
77 ASSERT_NOEXCEPT ( month_day_last{February}/year{2018}); in main()
78 ASSERT_SAME_TYPE(year_month_day_last, decltype(month_day_last{February}/year{2018})); in main()
80 static_assert((year{2018}/month_day_last{February}).month() == February, ""); in main()
[all …]
Dyear_month_weekday_last.pass.cpp46 using year = std::chrono::year; in main() typedef
57 constexpr year_month Feb2018{year{2018}, February}; in main()
62 static_assert((Feb2018/weekday_last{Tuesday}).year() == year{2018}, ""); in main()
70 year y{i}; in main()
74 assert(ymwdl.year() == y); in main()
84 ASSERT_NOEXCEPT ( year{2018}/FebLastTues); in main()
85 ASSERT_SAME_TYPE(year_month_weekday_last, decltype(year{2018}/FebLastTues)); in main()
86 ASSERT_NOEXCEPT ( FebLastTues/year{2018}); in main()
87 ASSERT_SAME_TYPE(year_month_weekday_last, decltype(FebLastTues/year{2018})); in main()
90 static_assert((year{2018}/FebLastTues).year() == year{2018}, ""); in main()
[all …]
Dyear_month.pass.cpp32 using year = std::chrono::year; in main() typedef
38 ASSERT_NOEXCEPT ( year{2018}/February); in main()
39 ASSERT_SAME_TYPE(year_month, decltype(year{2018}/February)); in main()
41 static_assert((year{2018}/February).year() == year{2018}, ""); in main()
42 static_assert((year{2018}/February).month() == month{2}, ""); in main()
46 year_month ym = year{i}/month{j}; in main()
47 assert(static_cast<int>(ym.year()) == i); in main()
54 ASSERT_NOEXCEPT ( year{2018}/4); in main()
55 ASSERT_SAME_TYPE(year_month, decltype(year{2018}/4)); in main()
57 static_assert((year{2018}/2).year() == year{2018}, ""); in main()
[all …]
/external/llvm-project/libcxx/test/std/utilities/time/time.cal/time.cal.operators/
Dyear_month_day_last.pass.cpp46 using year = std::chrono::year; in main() typedef
54 constexpr year_month Feb2018{year{2018}, February}; in main()
59 static_assert((Feb2018/last).year() == year{2018}, ""); in main()
65 year y{i}; in main()
68 assert(ymdl.year() == y); in main()
75 ASSERT_NOEXCEPT ( year{2018}/month_day_last{February}); in main()
76 ASSERT_SAME_TYPE(year_month_day_last, decltype(year{2018}/month_day_last{February})); in main()
77 ASSERT_NOEXCEPT ( month_day_last{February}/year{2018}); in main()
78 ASSERT_SAME_TYPE(year_month_day_last, decltype(month_day_last{February}/year{2018})); in main()
80 static_assert((year{2018}/month_day_last{February}).month() == February, ""); in main()
[all …]
Dyear_month_weekday_last.pass.cpp45 using year = std::chrono::year; in main() typedef
56 constexpr year_month Feb2018{year{2018}, February}; in main()
61 static_assert((Feb2018/weekday_last{Tuesday}).year() == year{2018}, ""); in main()
69 year y{i}; in main()
73 assert(ymwdl.year() == y); in main()
83 ASSERT_NOEXCEPT ( year{2018}/FebLastTues); in main()
84 ASSERT_SAME_TYPE(year_month_weekday_last, decltype(year{2018}/FebLastTues)); in main()
85 ASSERT_NOEXCEPT ( FebLastTues/year{2018}); in main()
86 ASSERT_SAME_TYPE(year_month_weekday_last, decltype(FebLastTues/year{2018})); in main()
89 static_assert((year{2018}/FebLastTues).year() == year{2018}, ""); in main()
[all …]
Dyear_month.pass.cpp31 using year = std::chrono::year; in main() typedef
37 ASSERT_NOEXCEPT ( year{2018}/February); in main()
38 ASSERT_SAME_TYPE(year_month, decltype(year{2018}/February)); in main()
40 static_assert((year{2018}/February).year() == year{2018}, ""); in main()
41 static_assert((year{2018}/February).month() == month{2}, ""); in main()
45 year_month ym = year{i}/month{j}; in main()
46 assert(static_cast<int>(ym.year()) == i); in main()
53 ASSERT_NOEXCEPT ( year{2018}/4); in main()
54 ASSERT_SAME_TYPE(year_month, decltype(year{2018}/4)); in main()
56 static_assert((year{2018}/2).year() == year{2018}, ""); in main()
[all …]
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/
Dcomparisons.pass.cpp36 using year = std::chrono::year; in main() typedef
47 year_month_day{year{1234}, January, day{1}}, in main()
48 year_month_day{year{1234}, January, day{1}}, in main()
53 year_month_day{year{1234}, January, day{1}}, in main()
54 year_month_day{year{1234}, January, day{2}}, in main()
59 year_month_day{year{1234}, January, day{1}}, in main()
60 year_month_day{year{1234}, February, day{1}}, in main()
65 year_month_day{year{1234}, January, day{1}}, in main()
66 year_month_day{year{1235}, January, day{1}}, in main()
72 year_month_day{year{1234}, January, day{2}}, in main()
[all …]
/external/llvm-project/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/
Dcomparisons.pass.cpp35 using year = std::chrono::year; in main() typedef
46 year_month_day{year{1234}, January, day{1}}, in main()
47 year_month_day{year{1234}, January, day{1}}, in main()
52 year_month_day{year{1234}, January, day{1}}, in main()
53 year_month_day{year{1234}, January, day{2}}, in main()
58 year_month_day{year{1234}, January, day{1}}, in main()
59 year_month_day{year{1234}, February, day{1}}, in main()
64 year_month_day{year{1234}, January, day{1}}, in main()
65 year_month_day{year{1235}, January, day{1}}, in main()
71 year_month_day{year{1234}, January, day{2}}, in main()
[all …]
/external/python/cpython2/Demo/classes/
DDates.py62 def _is_leap(year): # 1 if leap year, else 0 argument
63 if year % 4 != 0: return 0
64 if year % 400 == 0: return 1
65 return year % 100 != 0
67 def _days_in_year(year): # number of days in year argument
68 return 365 + _is_leap(year)
70 def _days_before_year(year): # number of days before year argument
71 return year*365L + (year+3)//4 - (year+99)//100 + (year+399)//400
73 def _days_in_month(month, year): # number of days in month of year argument
74 if month == 2 and _is_leap(year): return 29
[all …]
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/
Dcomparisons.pass.cpp28 using year = std::chrono::year; in main() typedef
42 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 1}}, in main()
43 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 1}}, in main()
48 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 1}}, in main()
49 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 2}}, in main()
54 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 1}}, in main()
55 year_month_weekday{year{1234}, February, weekday_indexed{Tuesday, 1}}, in main()
60 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 1}}, in main()
61 year_month_weekday{year{1235}, January, weekday_indexed{Tuesday, 1}}, in main()
67 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 1}}, in main()
[all …]
/external/llvm-project/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/
Dcomparisons.pass.cpp27 using year = std::chrono::year; in main() typedef
41 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 1}}, in main()
42 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 1}}, in main()
47 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 1}}, in main()
48 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 2}}, in main()
53 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 1}}, in main()
54 year_month_weekday{year{1234}, February, weekday_indexed{Tuesday, 1}}, in main()
59 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 1}}, in main()
60 year_month_weekday{year{1235}, January, weekday_indexed{Tuesday, 1}}, in main()
66 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 1}}, in main()
[all …]
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/
Dcomparisons.pass.cpp28 using year = std::chrono::year; in main() typedef
43 year_month_weekday_last{year{1234}, January, weekday_last{Tuesday}}, in main()
44 year_month_weekday_last{year{1234}, January, weekday_last{Tuesday}}, in main()
49 year_month_weekday_last{year{1234}, January, weekday_last{Tuesday}}, in main()
50 year_month_weekday_last{year{1234}, January, weekday_last{Wednesday}}, in main()
55 year_month_weekday_last{year{1234}, January, weekday_last{Tuesday}}, in main()
56 year_month_weekday_last{year{1234}, February, weekday_last{Tuesday}}, in main()
61 year_month_weekday_last{year{1234}, January, weekday_last{Tuesday}}, in main()
62 year_month_weekday_last{year{1235}, January, weekday_last{Tuesday}}, in main()
68 year_month_weekday_last{year{1234}, January, weekday_last{Tuesday}}, in main()
[all …]
/external/llvm-project/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/
Dcomparisons.pass.cpp27 using year = std::chrono::year; in main() typedef
42 year_month_weekday_last{year{1234}, January, weekday_last{Tuesday}}, in main()
43 year_month_weekday_last{year{1234}, January, weekday_last{Tuesday}}, in main()
48 year_month_weekday_last{year{1234}, January, weekday_last{Tuesday}}, in main()
49 year_month_weekday_last{year{1234}, January, weekday_last{Wednesday}}, in main()
54 year_month_weekday_last{year{1234}, January, weekday_last{Tuesday}}, in main()
55 year_month_weekday_last{year{1234}, February, weekday_last{Tuesday}}, in main()
60 year_month_weekday_last{year{1234}, January, weekday_last{Tuesday}}, in main()
61 year_month_weekday_last{year{1235}, January, weekday_last{Tuesday}}, in main()
67 year_month_weekday_last{year{1234}, January, weekday_last{Tuesday}}, in main()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/
DHebrewCalendar.java363 public HebrewCalendar(int year, int month, int date) { in HebrewCalendar() argument
365 this.set(YEAR, year); in HebrewCalendar()
402 public HebrewCalendar(int year, int month, int date, int hour, in HebrewCalendar() argument
406 this.set(YEAR, year); in HebrewCalendar()
460 int year = get(YEAR); in add() local
466 if (acrossAdar1 && month>=ADAR_1 && !isLeapYear(year)) { in add()
473 ++year; in add()
480 if (acrossAdar1 && month<=ADAR_1 && !isLeapYear(year)) { in add()
487 --year; in add()
492 set(YEAR, year); in add()
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/util/
DHebrewCalendar.java343 public HebrewCalendar(int year, int month, int date) { in HebrewCalendar() argument
345 this.set(YEAR, year); in HebrewCalendar()
380 public HebrewCalendar(int year, int month, int date, int hour, in HebrewCalendar() argument
384 this.set(YEAR, year); in HebrewCalendar()
437 int year = get(YEAR); in add() local
443 if (acrossAdar1 && month>=ADAR_1 && !isLeapYear(year)) { in add()
450 ++year; in add()
457 if (acrossAdar1 && month<=ADAR_1 && !isLeapYear(year)) { in add()
464 --year; in add()
469 set(YEAR, year); in add()
[all …]
/external/python/cpython2/Demo/scripts/
Dunbirthday.py14 year = int(sys.argv[1])
16 year = int(raw_input('In which year were you born? '))
17 if 0 <= year < 100:
18 print "I'll assume that by", year,
19 year = year + 1900
20 print 'you mean', year, 'and not the early Christian era'
21 elif not (1850 <= year <= time.localtime()[0]):
22 print "It's hard to believe you were born in", year
37 if month == 2 and calendar.isleap(year):
45 bdaytuple = (year, month, day)
[all …]
/external/llvm-project/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/
Dok.pass.cpp26 using year = std::chrono::year; in main() typedef
46 …static_assert(!year_month_weekday{year{-32768}, month{}, weekday_indexed{}}.ok(), ""); /… in main()
48 …static_assert(!year_month_weekday{year{-32768}, January, weekday_indexed{Tuesday, 1}}.ok(), ""); /… in main()
49 …static_assert(!year_month_weekday{year{2019}, month{}, weekday_indexed{Tuesday, 1}}.ok(), ""); /… in main()
50 …static_assert(!year_month_weekday{year{2019}, January, weekday_indexed{} }.ok(), ""); /… in main()
52 …static_assert(!year_month_weekday{year{-32768}, month{}, weekday_indexed{Tuesday, 1}}.ok(), ""); /… in main()
53 …static_assert(!year_month_weekday{year{2019}, month{}, weekday_indexed{} }.ok(), ""); /… in main()
54 …static_assert(!year_month_weekday{year{-32768}, January, weekday_indexed{} }.ok(), ""); /… in main()
56 …static_assert(!year_month_weekday{year{2019}, January, weekday_indexed{Tuesday, static_cast<unsi… in main()
57 …static_assert(!year_month_weekday{year{2019}, January, weekday_indexed{Wednesday, 0}}.ok(), "");… in main()
[all …]

12345678910>>...86