Lines Matching full:2015
55 EXPECT_EQ("2015-01-02T03:04:05", in TEST()
56 absl::FormatCivilTime(absl::CivilSecond(2015, 1, 2, 3, 4, 5))); in TEST()
57 EXPECT_EQ("2015-01-02T03:04:00", in TEST()
58 absl::FormatCivilTime(absl::CivilSecond(2015, 1, 2, 3, 4))); in TEST()
59 EXPECT_EQ("2015-01-02T03:00:00", in TEST()
60 absl::FormatCivilTime(absl::CivilSecond(2015, 1, 2, 3))); in TEST()
61 EXPECT_EQ("2015-01-02T00:00:00", in TEST()
62 absl::FormatCivilTime(absl::CivilSecond(2015, 1, 2))); in TEST()
63 EXPECT_EQ("2015-01-01T00:00:00", in TEST()
64 absl::FormatCivilTime(absl::CivilSecond(2015, 1))); in TEST()
65 EXPECT_EQ("2015-01-01T00:00:00", in TEST()
66 absl::FormatCivilTime(absl::CivilSecond(2015))); in TEST()
68 EXPECT_EQ("2015-01-02T03:04", in TEST()
69 absl::FormatCivilTime(absl::CivilMinute(2015, 1, 2, 3, 4, 5))); in TEST()
70 EXPECT_EQ("2015-01-02T03:04", in TEST()
71 absl::FormatCivilTime(absl::CivilMinute(2015, 1, 2, 3, 4))); in TEST()
72 EXPECT_EQ("2015-01-02T03:00", in TEST()
73 absl::FormatCivilTime(absl::CivilMinute(2015, 1, 2, 3))); in TEST()
74 EXPECT_EQ("2015-01-02T00:00", in TEST()
75 absl::FormatCivilTime(absl::CivilMinute(2015, 1, 2))); in TEST()
76 EXPECT_EQ("2015-01-01T00:00", in TEST()
77 absl::FormatCivilTime(absl::CivilMinute(2015, 1))); in TEST()
78 EXPECT_EQ("2015-01-01T00:00", in TEST()
79 absl::FormatCivilTime(absl::CivilMinute(2015))); in TEST()
81 EXPECT_EQ("2015-01-02T03", in TEST()
82 absl::FormatCivilTime(absl::CivilHour(2015, 1, 2, 3, 4, 5))); in TEST()
83 EXPECT_EQ("2015-01-02T03", in TEST()
84 absl::FormatCivilTime(absl::CivilHour(2015, 1, 2, 3, 4))); in TEST()
85 EXPECT_EQ("2015-01-02T03", in TEST()
86 absl::FormatCivilTime(absl::CivilHour(2015, 1, 2, 3))); in TEST()
87 EXPECT_EQ("2015-01-02T00", in TEST()
88 absl::FormatCivilTime(absl::CivilHour(2015, 1, 2))); in TEST()
89 EXPECT_EQ("2015-01-01T00", in TEST()
90 absl::FormatCivilTime(absl::CivilHour(2015, 1))); in TEST()
91 EXPECT_EQ("2015-01-01T00", in TEST()
92 absl::FormatCivilTime(absl::CivilHour(2015))); in TEST()
94 EXPECT_EQ("2015-01-02", in TEST()
95 absl::FormatCivilTime(absl::CivilDay(2015, 1, 2, 3, 4, 5))); in TEST()
96 EXPECT_EQ("2015-01-02", in TEST()
97 absl::FormatCivilTime(absl::CivilDay(2015, 1, 2, 3, 4))); in TEST()
98 EXPECT_EQ("2015-01-02", in TEST()
99 absl::FormatCivilTime(absl::CivilDay(2015, 1, 2, 3))); in TEST()
100 EXPECT_EQ("2015-01-02", in TEST()
101 absl::FormatCivilTime(absl::CivilDay(2015, 1, 2))); in TEST()
102 EXPECT_EQ("2015-01-01", in TEST()
103 absl::FormatCivilTime(absl::CivilDay(2015, 1))); in TEST()
104 EXPECT_EQ("2015-01-01", in TEST()
105 absl::FormatCivilTime(absl::CivilDay(2015))); in TEST()
107 EXPECT_EQ("2015-01", in TEST()
108 absl::FormatCivilTime(absl::CivilMonth(2015, 1, 2, 3, 4, 5))); in TEST()
109 EXPECT_EQ("2015-01", in TEST()
110 absl::FormatCivilTime(absl::CivilMonth(2015, 1, 2, 3, 4))); in TEST()
111 EXPECT_EQ("2015-01", in TEST()
112 absl::FormatCivilTime(absl::CivilMonth(2015, 1, 2, 3))); in TEST()
113 EXPECT_EQ("2015-01", in TEST()
114 absl::FormatCivilTime(absl::CivilMonth(2015, 1, 2))); in TEST()
115 EXPECT_EQ("2015-01", in TEST()
116 absl::FormatCivilTime(absl::CivilMonth(2015, 1))); in TEST()
117 EXPECT_EQ("2015-01", in TEST()
118 absl::FormatCivilTime(absl::CivilMonth(2015))); in TEST()
120 EXPECT_EQ("2015", in TEST()
121 absl::FormatCivilTime(absl::CivilYear(2015, 1, 2, 3, 4, 5))); in TEST()
122 EXPECT_EQ("2015", in TEST()
123 absl::FormatCivilTime(absl::CivilYear(2015, 1, 2, 3, 4))); in TEST()
124 EXPECT_EQ("2015", in TEST()
125 absl::FormatCivilTime(absl::CivilYear(2015, 1, 2, 3))); in TEST()
126 EXPECT_EQ("2015", in TEST()
127 absl::FormatCivilTime(absl::CivilYear(2015, 1, 2))); in TEST()
128 EXPECT_EQ("2015", in TEST()
129 absl::FormatCivilTime(absl::CivilYear(2015, 1))); in TEST()
130 EXPECT_EQ("2015", in TEST()
131 absl::FormatCivilTime(absl::CivilYear(2015))); in TEST()
203 absl::CivilYear year(2015); in TEST()
287 absl::CivilSecond second(2015, 1, 2, 3, 4, 5); in TEST()
288 EXPECT_EQ("2015-01-02T03:04:05", absl::FormatCivilTime(second)); in TEST()
291 EXPECT_EQ("2015-01-02T03:04", absl::FormatCivilTime(minute)); in TEST()
294 EXPECT_EQ("2015-01-02T03", absl::FormatCivilTime(hour)); in TEST()
297 EXPECT_EQ("2015-01-02", absl::FormatCivilTime(day)); in TEST()
300 EXPECT_EQ("2015-01", absl::FormatCivilTime(month)); in TEST()
303 EXPECT_EQ("2015", absl::FormatCivilTime(year)); in TEST()
310 EXPECT_EQ("2015-01", absl::FormatCivilTime(month)); in TEST()
313 EXPECT_EQ("2015-01-01", absl::FormatCivilTime(day)); in TEST()
316 EXPECT_EQ("2015-01-01T00", absl::FormatCivilTime(hour)); in TEST()
319 EXPECT_EQ("2015-01-01T00:00", absl::FormatCivilTime(minute)); in TEST()
322 EXPECT_EQ("2015-01-01T00:00:00", absl::FormatCivilTime(second)); in TEST()
367 const absl::CivilHour a(2015, 1, 2, 3); in TEST()
372 EXPECT_EQ("2015-01-02T03", absl::FormatCivilTime(d)); in TEST()
402 absl::CivilSecond(2015, 1, 1, 0, 0, 0)); in TEST()
424 absl::CivilSecond second(2015, 1, 2, 3, 4, 5); in TEST()
425 EXPECT_EQ("2015-01-02T03:04:06", absl::FormatCivilTime(second += 1)); in TEST()
426 EXPECT_EQ("2015-01-02T03:04:07", absl::FormatCivilTime(second + 1)); in TEST()
427 EXPECT_EQ("2015-01-02T03:04:08", absl::FormatCivilTime(2 + second)); in TEST()
428 EXPECT_EQ("2015-01-02T03:04:05", absl::FormatCivilTime(second - 1)); in TEST()
429 EXPECT_EQ("2015-01-02T03:04:05", absl::FormatCivilTime(second -= 1)); in TEST()
430 EXPECT_EQ("2015-01-02T03:04:05", absl::FormatCivilTime(second++)); in TEST()
431 EXPECT_EQ("2015-01-02T03:04:07", absl::FormatCivilTime(++second)); in TEST()
432 EXPECT_EQ("2015-01-02T03:04:07", absl::FormatCivilTime(second--)); in TEST()
433 EXPECT_EQ("2015-01-02T03:04:05", absl::FormatCivilTime(--second)); in TEST()
435 absl::CivilMinute minute(2015, 1, 2, 3, 4); in TEST()
436 EXPECT_EQ("2015-01-02T03:05", absl::FormatCivilTime(minute += 1)); in TEST()
437 EXPECT_EQ("2015-01-02T03:06", absl::FormatCivilTime(minute + 1)); in TEST()
438 EXPECT_EQ("2015-01-02T03:07", absl::FormatCivilTime(2 + minute)); in TEST()
439 EXPECT_EQ("2015-01-02T03:04", absl::FormatCivilTime(minute - 1)); in TEST()
440 EXPECT_EQ("2015-01-02T03:04", absl::FormatCivilTime(minute -= 1)); in TEST()
441 EXPECT_EQ("2015-01-02T03:04", absl::FormatCivilTime(minute++)); in TEST()
442 EXPECT_EQ("2015-01-02T03:06", absl::FormatCivilTime(++minute)); in TEST()
443 EXPECT_EQ("2015-01-02T03:06", absl::FormatCivilTime(minute--)); in TEST()
444 EXPECT_EQ("2015-01-02T03:04", absl::FormatCivilTime(--minute)); in TEST()
446 absl::CivilHour hour(2015, 1, 2, 3); in TEST()
447 EXPECT_EQ("2015-01-02T04", absl::FormatCivilTime(hour += 1)); in TEST()
448 EXPECT_EQ("2015-01-02T05", absl::FormatCivilTime(hour + 1)); in TEST()
449 EXPECT_EQ("2015-01-02T06", absl::FormatCivilTime(2 + hour)); in TEST()
450 EXPECT_EQ("2015-01-02T03", absl::FormatCivilTime(hour - 1)); in TEST()
451 EXPECT_EQ("2015-01-02T03", absl::FormatCivilTime(hour -= 1)); in TEST()
452 EXPECT_EQ("2015-01-02T03", absl::FormatCivilTime(hour++)); in TEST()
453 EXPECT_EQ("2015-01-02T05", absl::FormatCivilTime(++hour)); in TEST()
454 EXPECT_EQ("2015-01-02T05", absl::FormatCivilTime(hour--)); in TEST()
455 EXPECT_EQ("2015-01-02T03", absl::FormatCivilTime(--hour)); in TEST()
457 absl::CivilDay day(2015, 1, 2); in TEST()
458 EXPECT_EQ("2015-01-03", absl::FormatCivilTime(day += 1)); in TEST()
459 EXPECT_EQ("2015-01-04", absl::FormatCivilTime(day + 1)); in TEST()
460 EXPECT_EQ("2015-01-05", absl::FormatCivilTime(2 + day)); in TEST()
461 EXPECT_EQ("2015-01-02", absl::FormatCivilTime(day - 1)); in TEST()
462 EXPECT_EQ("2015-01-02", absl::FormatCivilTime(day -= 1)); in TEST()
463 EXPECT_EQ("2015-01-02", absl::FormatCivilTime(day++)); in TEST()
464 EXPECT_EQ("2015-01-04", absl::FormatCivilTime(++day)); in TEST()
465 EXPECT_EQ("2015-01-04", absl::FormatCivilTime(day--)); in TEST()
466 EXPECT_EQ("2015-01-02", absl::FormatCivilTime(--day)); in TEST()
468 absl::CivilMonth month(2015, 1); in TEST()
469 EXPECT_EQ("2015-02", absl::FormatCivilTime(month += 1)); in TEST()
470 EXPECT_EQ("2015-03", absl::FormatCivilTime(month + 1)); in TEST()
471 EXPECT_EQ("2015-04", absl::FormatCivilTime(2 + month)); in TEST()
472 EXPECT_EQ("2015-01", absl::FormatCivilTime(month - 1)); in TEST()
473 EXPECT_EQ("2015-01", absl::FormatCivilTime(month -= 1)); in TEST()
474 EXPECT_EQ("2015-01", absl::FormatCivilTime(month++)); in TEST()
475 EXPECT_EQ("2015-03", absl::FormatCivilTime(++month)); in TEST()
476 EXPECT_EQ("2015-03", absl::FormatCivilTime(month--)); in TEST()
477 EXPECT_EQ("2015-01", absl::FormatCivilTime(--month)); in TEST()
479 absl::CivilYear year(2015); in TEST()
483 EXPECT_EQ("2015", absl::FormatCivilTime(year - 1)); in TEST()
484 EXPECT_EQ("2015", absl::FormatCivilTime(year -= 1)); in TEST()
485 EXPECT_EQ("2015", absl::FormatCivilTime(year++)); in TEST()
488 EXPECT_EQ("2015", absl::FormatCivilTime(--year)); in TEST()
557 absl::CivilSecond second(2015, 1, 2, 3, 4, 5); in TEST()
562 absl::CivilMinute minute(2015, 1, 2, 3, 4); in TEST()
567 absl::CivilHour hour(2015, 1, 2, 3); in TEST()
572 absl::CivilDay day(2015, 1, 2); in TEST()
577 absl::CivilMonth month(2015, 1); in TEST()
582 absl::CivilYear year(2015); in TEST()
612 absl::CivilSecond ss(2015, 2, 3, 4, 5, 6); in TEST()
613 EXPECT_EQ(2015, ss.year()); in TEST()
622 absl::CivilMinute mm(2015, 2, 3, 4, 5, 6); in TEST()
623 EXPECT_EQ(2015, mm.year()); in TEST()
632 absl::CivilHour hh(2015, 2, 3, 4, 5, 6); in TEST()
633 EXPECT_EQ(2015, hh.year()); in TEST()
642 absl::CivilDay d(2015, 2, 3, 4, 5, 6); in TEST()
643 EXPECT_EQ(2015, d.year()); in TEST()
652 absl::CivilMonth m(2015, 2, 3, 4, 5, 6); in TEST()
653 EXPECT_EQ(2015, m.year()); in TEST()
662 absl::CivilYear y(2015, 2, 3, 4, 5, 6); in TEST()
663 EXPECT_EQ(2015, y.year()); in TEST()
702 EXPECT_TRUE(absl::ParseCivilTime("2015-01-02T03:04:05", &ss)); in TEST()
703 EXPECT_EQ("2015-01-02T03:04:05", absl::FormatCivilTime(ss)); in TEST()
704 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02T03:04:05", &mm)); in TEST()
705 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02T03:04:05", &hh)); in TEST()
706 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02T03:04:05", &d)); in TEST()
707 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02T03:04:05", &m)); in TEST()
708 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02T03:04:05", &y)); in TEST()
711 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02T03:04", &ss)); in TEST()
712 EXPECT_TRUE(absl::ParseCivilTime("2015-01-02T03:04", &mm)); in TEST()
713 EXPECT_EQ("2015-01-02T03:04", absl::FormatCivilTime(mm)); in TEST()
714 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02T03:04", &hh)); in TEST()
715 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02T03:04", &d)); in TEST()
716 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02T03:04", &m)); in TEST()
717 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02T03:04", &y)); in TEST()
720 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02T03", &ss)); in TEST()
721 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02T03", &mm)); in TEST()
722 EXPECT_TRUE(absl::ParseCivilTime("2015-01-02T03", &hh)); in TEST()
723 EXPECT_EQ("2015-01-02T03", absl::FormatCivilTime(hh)); in TEST()
724 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02T03", &d)); in TEST()
725 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02T03", &m)); in TEST()
726 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02T03", &y)); in TEST()
729 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02", &ss)); in TEST()
730 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02", &mm)); in TEST()
731 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02", &hh)); in TEST()
732 EXPECT_TRUE(absl::ParseCivilTime("2015-01-02", &d)); in TEST()
733 EXPECT_EQ("2015-01-02", absl::FormatCivilTime(d)); in TEST()
734 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02", &m)); in TEST()
735 EXPECT_FALSE(absl::ParseCivilTime("2015-01-02", &y)); in TEST()
738 EXPECT_FALSE(absl::ParseCivilTime("2015-01", &ss)); in TEST()
739 EXPECT_FALSE(absl::ParseCivilTime("2015-01", &mm)); in TEST()
740 EXPECT_FALSE(absl::ParseCivilTime("2015-01", &hh)); in TEST()
741 EXPECT_FALSE(absl::ParseCivilTime("2015-01", &d)); in TEST()
742 EXPECT_TRUE(absl::ParseCivilTime("2015-01", &m)); in TEST()
743 EXPECT_EQ("2015-01", absl::FormatCivilTime(m)); in TEST()
744 EXPECT_FALSE(absl::ParseCivilTime("2015-01", &y)); in TEST()
747 EXPECT_FALSE(absl::ParseCivilTime("2015", &ss)); in TEST()
748 EXPECT_FALSE(absl::ParseCivilTime("2015", &mm)); in TEST()
749 EXPECT_FALSE(absl::ParseCivilTime("2015", &hh)); in TEST()
750 EXPECT_FALSE(absl::ParseCivilTime("2015", &d)); in TEST()
751 EXPECT_FALSE(absl::ParseCivilTime("2015", &m)); in TEST()
752 EXPECT_TRUE(absl::ParseCivilTime("2015", &y)); in TEST()
753 EXPECT_EQ("2015", absl::FormatCivilTime(y)); in TEST()
775 EXPECT_TRUE(absl::ParseLenientCivilTime("2015-01-02T03:04:05", &ss)); in TEST()
776 EXPECT_EQ("2015-01-02T03:04:05", absl::FormatCivilTime(ss)); in TEST()
778 EXPECT_TRUE(absl::ParseLenientCivilTime("2015-01-02T03:04:05", &mm)); in TEST()
779 EXPECT_EQ("2015-01-02T03:04", absl::FormatCivilTime(mm)); in TEST()
781 EXPECT_TRUE(absl::ParseLenientCivilTime("2015-01-02T03:04:05", &hh)); in TEST()
782 EXPECT_EQ("2015-01-02T03", absl::FormatCivilTime(hh)); in TEST()
784 EXPECT_TRUE(absl::ParseLenientCivilTime("2015-01-02T03:04:05", &d)); in TEST()
785 EXPECT_EQ("2015-01-02", absl::FormatCivilTime(d)); in TEST()
787 EXPECT_TRUE(absl::ParseLenientCivilTime("2015-01-02T03:04:05", &m)); in TEST()
788 EXPECT_EQ("2015-01", absl::FormatCivilTime(m)); in TEST()
790 EXPECT_TRUE(absl::ParseLenientCivilTime("2015-01-02T03:04:05", &y)); in TEST()
791 EXPECT_EQ("2015", absl::FormatCivilTime(y)); in TEST()
842 EXPECT_TRUE(absl::ParseLenientCivilTime(" 2015 ", &ss)) << ss; in TEST()
843 EXPECT_EQ(absl::CivilYear(2015), ss); in TEST()
844 EXPECT_TRUE(absl::ParseLenientCivilTime(" 2015-6 ", &ss)) << ss; in TEST()
845 EXPECT_EQ(absl::CivilMonth(2015, 6), ss); in TEST()
846 EXPECT_TRUE(absl::ParseLenientCivilTime("2015-6-7", &ss)) << ss; in TEST()
847 EXPECT_EQ(absl::CivilDay(2015, 6, 7), ss); in TEST()
848 EXPECT_TRUE(absl::ParseLenientCivilTime(" 2015-6-7 ", &ss)) << ss; in TEST()
849 EXPECT_EQ(absl::CivilDay(2015, 6, 7), ss); in TEST()
850 EXPECT_TRUE(absl::ParseLenientCivilTime("2015-06-07T10:11:12 ", &ss)) << ss; in TEST()
851 EXPECT_EQ(absl::CivilSecond(2015, 6, 7, 10, 11, 12), ss); in TEST()
852 EXPECT_TRUE(absl::ParseLenientCivilTime(" 2015-06-07T10:11:12 ", &ss)) << ss; in TEST()
853 EXPECT_EQ(absl::CivilSecond(2015, 6, 7, 10, 11, 12), ss); in TEST()
858 EXPECT_FALSE(absl::ParseLenientCivilTime("01-01-2015", &ss)) << ss; in TEST()
859 EXPECT_FALSE(absl::ParseLenientCivilTime("2015-", &ss)) << ss; in TEST()
861 EXPECT_FALSE(absl::ParseLenientCivilTime("2015-02-30T04:05:06", &ss)) << ss; in TEST()
862 EXPECT_FALSE(absl::ParseLenientCivilTime("2015-02-03T04:05:96", &ss)) << ss; in TEST()
864 EXPECT_FALSE(absl::ParseLenientCivilTime("2015-02-03T04:05:003", &ss)) << ss; in TEST()
865 EXPECT_FALSE(absl::ParseLenientCivilTime("2015 -02-03T04:05:06", &ss)) << ss; in TEST()
866 EXPECT_FALSE(absl::ParseLenientCivilTime("2015-02-03-04:05:06", &ss)) << ss; in TEST()
867 EXPECT_FALSE(absl::ParseLenientCivilTime("2015:02:03T04-05-06", &ss)) << ss; in TEST()
1211 absl::CivilSecond second(2015, 6, 28, 1, 2, 3); // 2015-06-28 01:02:03 in TEST()
1212 absl::CivilMinute minute(second); // 2015-06-28 01:02:00 in TEST()
1213 absl::CivilDay day(minute); // 2015-06-28 00:00:00 in TEST()
1215 second -= 1; // 2015-06-28 01:02:02 in TEST()
1216 --second; // 2015-06-28 01:02:01 in TEST()
1222 absl::CivilDay june_1(2015, 6, 1); // Pass fields to c'tor. in TEST()
1227 absl::CivilDay day_floor(2015, 1, 2, 9, 9, 9); in TEST()
1229 EXPECT_EQ(absl::CivilDay(2015, 1, 2), day_floor); in TEST()
1232 absl::CivilDay day_default(2015); // Defaults to Jan 1 in TEST()
1233 EXPECT_EQ(absl::CivilDay(2015, 1, 1), day_default); in TEST()