Home
last modified time | relevance | path

Searched refs:months (Results 1 – 25 of 191) sorted by relevance

12345678

/external/python/dateutil/dateutil/
Drelativedelta.py92 years=0, months=0, days=0, leapdays=0, weeks=0, argument
114 self.months = 0
132 months = (dt1.year - dt2.year) * 12 + (dt1.month - dt2.month)
133 self._set_months(months)
148 months += increment
149 self._set_months(months)
158 if any(x is not None and x != int(x) for x in (years, months)):
164 self.months = int(months)
238 if abs(self.months) > 11:
239 s = _sign(self.months)
[all …]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/duration/testdata/
Dtestdata_en.txt35 3 months ago
36 2 months ago
38 0 months
40 2 months from now
41 3 months from now
42 5 months from now
43 10 months from now
44 11 months from now
45 12 months from now
46 20 months from now
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/duration/testdata/
Dtestdata_en.txt35 3 months ago
36 2 months ago
38 0 months
40 2 months from now
41 3 months from now
42 5 months from now
43 10 months from now
44 11 months from now
45 12 months from now
46 20 months from now
[all …]
/external/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/
Dplus.pass.cpp50 using months = std::chrono::months; in main() typedef
52 ASSERT_NOEXCEPT(std::declval<month>() + std::declval<months>()); in main()
53 ASSERT_NOEXCEPT(std::declval<months>() + std::declval<month>()); in main()
55 ASSERT_SAME_TYPE(month, decltype(std::declval<month>() + std::declval<months>())); in main()
56 ASSERT_SAME_TYPE(month, decltype(std::declval<months>() + std::declval<month>() )); in main()
58 static_assert(testConstexpr<month, months>(), ""); in main()
63 month m1 = my + months{i}; in main()
64 month m2 = months{i} + my; in main()
Dminus.pass.cpp51 using months = std::chrono::months; in main() typedef
53 ASSERT_NOEXCEPT(std::declval<month>() - std::declval<months>()); in main()
56 ASSERT_SAME_TYPE(month , decltype(std::declval<month>() - std::declval<months>())); in main()
57 ASSERT_SAME_TYPE(months, decltype(std::declval<month>() - std::declval<month> ())); in main()
59 static_assert(testConstexpr<month, months>(), ""); in main()
64 month m1 = m - months{i}; in main()
/external/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/
Dplus_minus_equal.pass.cpp39 using months = std::chrono::months; in main() typedef
41 ASSERT_NOEXCEPT(std::declval<month&>() += std::declval<months&>()); in main()
42 ASSERT_NOEXCEPT(std::declval<month&>() -= std::declval<months&>()); in main()
43 ASSERT_SAME_TYPE(month&, decltype(std::declval<month&>() += std::declval<months&>())); in main()
44 ASSERT_SAME_TYPE(month&, decltype(std::declval<month&>() -= std::declval<months&>())); in main()
46 static_assert(testConstexpr<month, months>(), ""); in main()
54 assert(static_cast<unsigned>(month += months{10}) == static_cast<unsigned>(exp)); in main()
64 assert(static_cast<unsigned>(month -= months{ 9}) == static_cast<unsigned>(exp)); in main()
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/
Dplus_minus_equal_month.pass.cpp39 using months = std::chrono::months; in main() typedef
43 ASSERT_NOEXCEPT( std::declval<year_month&>() += std::declval<months>()); in main()
44 ASSERT_SAME_TYPE(year_month&, decltype(std::declval<year_month&>() += std::declval<months>())); in main()
46 ASSERT_NOEXCEPT( std::declval<year_month&>() -= std::declval<months>()); in main()
47 ASSERT_SAME_TYPE(year_month&, decltype(std::declval<year_month&>() -= std::declval<months>())); in main()
49 static_assert(testConstexpr<year_month, months>(year_month{year{1234}, month{1}}), ""); in main()
55 assert(static_cast<unsigned>((ym += months{2}).month()) == i + 2); in main()
59 assert(static_cast<unsigned>((ym -= months{1}).month()) == i + 1); in main()
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/
Dplus_minus_equal_month.pass.cpp42 using months = std::chrono::months; in main() typedef
44 ASSERT_NOEXCEPT(std::declval<year_month_day_last&>() += std::declval<months>()); in main()
45 ASSERT_NOEXCEPT(std::declval<year_month_day_last&>() -= std::declval<months>()); in main()
47 …PE(year_month_day_last&, decltype(std::declval<year_month_day_last&>() += std::declval<months>())); in main()
48 …PE(year_month_day_last&, decltype(std::declval<year_month_day_last&>() -= std::declval<months>())); in main()
50 …static_assert(testConstexpr<year_month_day_last, months>(year_month_day_last{year{1234}, month_day… in main()
57 assert(static_cast<unsigned>((ym += months{2}).month()) == i + 2); in main()
61 assert(static_cast<unsigned>((ym -= months{1}).month()) == i + 1); in main()
/external/python/dateutil/dateutil/test/
Dtest_relativedelta.py21 ccRD = rdChildClass(years=1, months=1, days=1, leapdays=1, weeks=1,
24 rd = relativedelta(years=1, months=1, days=1, leapdays=1, weeks=1,
45 relativedelta(months=-1, seconds=-1))
49 relativedelta(months=1, seconds=1))
54 relativedelta(months=-1, seconds=-1))
58 relativedelta(months=1, seconds=1))
61 self.assertEqual(self.now+relativedelta(months=+1),
65 self.assertEqual(self.now+relativedelta(months=+1, weeks=+1),
70 relativedelta(months=+1, weeks=+1, hour=10),
76 relativedelta(months=+1, days=+7, hours=+10))
[all …]
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/
Dplus_minus_equal_month.pass.cpp42 using months = std::chrono::months; in main() typedef
44 ASSERT_NOEXCEPT(std::declval<year_month_day&>() += std::declval<months>()); in main()
45 ASSERT_NOEXCEPT(std::declval<year_month_day&>() -= std::declval<months>()); in main()
47 …RT_SAME_TYPE(year_month_day&, decltype(std::declval<year_month_day&>() += std::declval<months>())); in main()
48 …RT_SAME_TYPE(year_month_day&, decltype(std::declval<year_month_day&>() -= std::declval<months>())); in main()
50 …static_assert(testConstexpr<year_month_day, months>(year_month_day{year{1234}, month{1}, day{1}}),… in main()
57 assert(static_cast<unsigned>((ym += months{2}).month()) == i + 2); in main()
63 assert(static_cast<unsigned>((ym -= months{1}).month()) == i + 1); in main()
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/
Dplus_minus_equal_month.pass.cpp43 using months = std::chrono::months; in main() typedef
45 ASSERT_NOEXCEPT(std::declval<year_month_weekday_last&>() += std::declval<months>()); in main()
46 ASSERT_NOEXCEPT(std::declval<year_month_weekday_last&>() -= std::declval<months>()); in main()
48 …month_weekday_last&, decltype(std::declval<year_month_weekday_last&>() += std::declval<months>())); in main()
49 …month_weekday_last&, decltype(std::declval<year_month_weekday_last&>() -= std::declval<months>())); in main()
52 …static_assert(testConstexpr<year_month_weekday_last, months>(year_month_weekday_last{year{1234}, m… in main()
59 assert(static_cast<unsigned>((ymwd += months{2}).month()) == i + 2); in main()
67 assert(static_cast<unsigned>((ymwd -= months{1}).month()) == i + 1); in main()
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/
Dplus_minus_equal_month.pass.cpp43 using months = std::chrono::months; in main() typedef
46 …CEPT( std::declval<year_month_weekday&>() += std::declval<months>()); in main()
47 …TYPE(year_month_weekday&, decltype(std::declval<year_month_weekday&>() += std::declval<months>())); in main()
49 …CEPT( std::declval<year_month_weekday&>() -= std::declval<months>()); in main()
50 …TYPE(year_month_weekday&, decltype(std::declval<year_month_weekday&>() -= std::declval<months>())); in main()
53 …static_assert(testConstexpr<year_month_weekday, months>(year_month_weekday{year{1234}, month{1}, w… in main()
60 assert(static_cast<unsigned>((ymwd += months{2}).month()) == i + 2); in main()
70 assert(static_cast<unsigned>((ymwd -= months{1}).month()) == i + 1); in main()
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/
Dplus.pass.cpp47 std::chrono::months offset{6}; in testConstexprMonths()
60 using months = std::chrono::months; in main() typedef
86 ASSERT_NOEXCEPT(std::declval<year_month>() + std::declval<months>()); in main()
87 ASSERT_NOEXCEPT(std::declval<months>() + std::declval<year_month>()); in main()
89 ASSERT_SAME_TYPE(year_month, decltype(std::declval<year_month>() + std::declval<months>())); in main()
90 ASSERT_SAME_TYPE(year_month, decltype(std::declval<months>() + std::declval<year_month>())); in main()
97 year_month ym1 = ym + months{i}; in main()
98 year_month ym2 = months{i} + ym; in main()
Dminus.pass.cpp38 using months = std::chrono::months; in main() typedef
57 ASSERT_NOEXCEPT( std::declval<year_month>() - std::declval<months>()); in main()
58 ASSERT_SAME_TYPE(year_month, decltype(std::declval<year_month>() - std::declval<months>())); in main()
65 year_month ym1 = ym - months{i}; in main()
73 ASSERT_SAME_TYPE(months, decltype(std::declval<year_month>() - std::declval<year_month>())); in main()
82 months diff = year_month{y, month(i)} - year_month{y, month(j)}; in main()
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/
Dplus.pass.cpp57 std::chrono::months offset{6}; in testConstexprMonths()
73 using months = std::chrono::months; in main() typedef
79 ASSERT_NOEXCEPT(std::declval<year_month_day_last>() + std::declval<months>()); in main()
80 ASSERT_NOEXCEPT(std::declval<months>() + std::declval<year_month_day_last>()); in main()
82 …_TYPE(year_month_day_last, decltype(std::declval<year_month_day_last>() + std::declval<months>())); in main()
83 …ASSERT_SAME_TYPE(year_month_day_last, decltype(std::declval<months>() + std::declval<year_month_da… in main()
90 year_month_day_last ym1 = ym + months{i}; in main()
91 year_month_day_last ym2 = months{i} + ym; in main()
Dminus.pass.cpp44 std::chrono::year_month_day_last ym1 = ymdl - std::chrono::months{6}; in testConstexprMonths()
57 using months = std::chrono::months; in main() typedef
77 …XCEPT( std::declval<year_month_day_last>() - std::declval<months>()); in main()
78 …_TYPE(year_month_day_last, decltype(std::declval<year_month_day_last>() - std::declval<months>())); in main()
85 year_month_day_last ym1 = ym - months{i}; in main()
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/
Dplus.pass.cpp47 std::chrono::months offset{6}; in testConstexprMonths()
61 using months = std::chrono::months; in main() typedef
65 ASSERT_NOEXCEPT(std::declval<year_month_day>() + std::declval<months>()); in main()
66 ASSERT_NOEXCEPT(std::declval<months>() + std::declval<year_month_day>()); in main()
68 …ASSERT_SAME_TYPE(year_month_day, decltype(std::declval<year_month_day>() + std::declval<months>())… in main()
69 …ASSERT_SAME_TYPE(year_month_day, decltype(std::declval<months>() + std::declval<year_month_day>())… in main()
76 year_month_day ym1 = ym + months{i}; in main()
77 year_month_day ym2 = months{i} + ym; in main()
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/
Dplus.pass.cpp47 std::chrono::months offset{6}; in testConstexprMonths()
63 using months = std::chrono::months; in main() typedef
69 ASSERT_NOEXCEPT(std::declval<year_month_weekday>() + std::declval<months>()); in main()
70 ASSERT_NOEXCEPT(std::declval<months>() + std::declval<year_month_weekday>()); in main()
72 …ME_TYPE(year_month_weekday, decltype(std::declval<year_month_weekday>() + std::declval<months>())); in main()
73 …ASSERT_SAME_TYPE(year_month_weekday, decltype(std::declval<months>() + std::declval<year_month_wee… in main()
80 year_month_weekday ym1 = ym + months{i}; in main()
81 year_month_weekday ym2 = months{i} + ym; in main()
Dminus.pass.cpp44 std::chrono::year_month_weekday ym1 = ym0 - std::chrono::months{6}; in testConstexprMonths()
62 using months = std::chrono::months; in main() typedef
85 …OEXCEPT( std::declval<year_month_weekday>() - std::declval<months>()); in main()
86 …ME_TYPE(year_month_weekday, decltype(std::declval<year_month_weekday>() - std::declval<months>())); in main()
93 year_month_weekday ym1 = ym - months{i}; in main()
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/
Dplus.pass.cpp43 std::chrono::months offset{6}; in testConstexprMonths()
59 using months = std::chrono::months; in main() typedef
65 ASSERT_NOEXCEPT(std::declval<year_month_weekday_last>() + std::declval<months>()); in main()
66 ASSERT_NOEXCEPT(std::declval<months>() + std::declval<year_month_weekday_last>()); in main()
68 …ar_month_weekday_last, decltype(std::declval<year_month_weekday_last>() + std::declval<months>())); in main()
69 …ASSERT_SAME_TYPE(year_month_weekday_last, decltype(std::declval<months>() + std::declval<year_mont… in main()
76 year_month_weekday_last ym1 = ym + months{i}; in main()
77 year_month_weekday_last ym2 = months{i} + ym; in main()
Dminus.pass.cpp38 std::chrono::months offset{6}; in testConstexprMonths()
52 using months = std::chrono::months; in main() typedef
77 … std::declval<year_month_weekday_last>() - std::declval<months>()); in main()
78 …ar_month_weekday_last, decltype(std::declval<year_month_weekday_last>() - std::declval<months>())); in main()
85 year_month_weekday_last ym1 = ym - months{i}; in main()
/external/python/dateutil/docs/
Drelativedelta.rst36 >>> NOW+relativedelta(months=+1)
43 >>> NOW+relativedelta(months=+1, weeks=+1)
50 >>> TODAY+relativedelta(months=+1, weeks=+1, hour=10)
70 relativedelta(months=+1, days=+7, hours=+10)
76 >>> NOW+relativedelta(years=+1, months=-1)
79 How does it handle months with different numbers of days?
85 >>> date(2003,1,27)+relativedelta(months=+1)
87 >>> date(2003,1,31)+relativedelta(months=+1)
89 >>> date(2003,1,31)+relativedelta(months=+2)
157 relativedelta(years=+2, months=+8, days=+16,
[all …]
/external/icu/icu4c/source/samples/cal/
Dcal.c68 UChar *months [], UBool useLongNames,
71 static void free_months(UChar *months[]);
83 UChar *days [], UChar *months [],
237 UChar *months [MONTH_COUNT]; in cal() local
257 print_year(c, days, months, useLongNames, fdow, status); in cal()
363 UChar *months [], in get_months()
372 …get_symbols(fmt, monthType, months, MONTH_COUNT - 1, 0, 0, status); /* some locales have 13 months… in get_months()
375 static void free_months(UChar *months[]) in free_months() argument
377 free_symbols(months, MONTH_COUNT - 1); in free_months()
541 UChar *months [], in print_year()
[all …]
/external/python/cpython2/Lib/
Dcalendar.py228 months = [
232 return [months[i:i+width] for i in range(0, len(months), width) ]
241 months = [
245 return [months[i:i+width] for i in range(0, len(months), width) ]
253 months = [
257 return [months[i:i+width] for i in range(0, len(months), width) ]
350 months = range(m*i+1, min(m*(i+1)+1, 13))
353 for k in months)
356 headers = (header for k in months)
455 months = range(i, min(i+width, 13))
[all …]
/external/python/cpython3/Lib/
Dcalendar.py261 months = [
265 return [months[i:i+width] for i in range(0, len(months), width) ]
274 months = [
278 return [months[i:i+width] for i in range(0, len(months), width) ]
286 months = [
290 return [months[i:i+width] for i in range(0, len(months), width) ]
383 months = range(m*i+1, min(m*(i+1)+1, 13))
386 for k in months)
389 headers = (header for k in months)
512 months = range(i, min(i+width, 13))
[all …]

12345678