Home
last modified time | relevance | path

Searched full:year (Results 1 – 25 of 1630) sorted by relevance

12345678910>>...66

/external/protobuf/src/google/protobuf/stubs/
Dtime.cc27 // Count the seconds from the given year (start at Jan 1, 00:00) to 100 years
29 int64 SecondsPer100Years(int year) { in SecondsPer100Years() argument
30 if (year % 400 == 0 || year % 400 > 300) { in SecondsPer100Years()
37 // Count the seconds from the given year (start at Jan 1, 00:00) to 4 years
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
[all …]
/external/python/cpython2/Demo/classes/
DDates.py3 # Date(month,day,year) returns a Date object. An instance prints as,
22 # .year int or long int
30 # hand, at least this package knows that 2000 is a leap year but 2100
62 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
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/util/
DIndianCalendar.java48 * So When its a leap year in Gregorian calendar then Chaitra has 31 days.
51 * Years are counted in the Saka Era, which starts its year 0 in 78AD (by gregorian calendar).
73 * Constant for Chaitra, the 1st month of the Indian year.
78 * Constant for Vaisakha, the 2nd month of the Indian year.
83 * Constant for Jyaistha, the 3rd month of the Indian year.
88 * Constant for Asadha, the 4th month of the Indian year.
93 * Constant for Sravana, the 5th month of the Indian year.
98 * Constant for Bhadra, the 6th month of the Indian year.
103 * Constant for Asvina, the 7th month of the Indian year.
108 * Constant for Kartika, the 8th month of the Indian year.
[all …]
DCopticCalendar.java32 * the 1st month of the Coptic year.
38 * the 2nd month of the Coptic year.
44 * the 3rd month of the Coptic year.
50 * the 4th month of the Coptic year.
56 * the 5th month of the Coptic year.
62 * the 6th month of the Coptic year.
68 * the 7th month of the Coptic year.
74 * the 8th month of the Coptic year.
80 * the 9th month of the Coptic year.
86 * the 10th month of the Coptic year.
[all …]
DHebrewCalendar.java26 * solar year (approximately 365.24 days) is not an even multiple of
29 * interesting, the start of a year can be delayed by up to three days
31 * to prevent certain illegal year lengths. Finally, the lengths of certain
32 * months can vary depending on the number of days in the year.
36 * not come at the end of the year, calculations involving
86 * Constant for Tishri, the 1st month of the Hebrew year.
91 * Constant for Heshvan, the 2nd month of the Hebrew year.
96 * Constant for Kislev, the 3rd month of the Hebrew year.
101 * Constant for Tevet, the 4th month of the Hebrew year.
106 * Constant for Shevat, the 5th month of the Hebrew year.
[all …]
DEthiopicCalendar.java34 * Constant for መስከረም, the 1st month of the Ethiopic year.
39 * Constant for ጥቅምት, the 2nd month of the Ethiopic year.
44 * Constant for ኅዳር, the 3rd month of the Ethiopic year.
49 * Constant for ታኅሣሥ, the 4th month of the Ethiopic year.
54 * Constant for ጥር, the 5th month of the Ethiopic year.
59 * Constant for የካቲት, the 6th month of the Ethiopic year.
64 * Constant for መጋቢት, the 7th month of the Ethiopic year.
69 * Constant for ሚያዝያ, the 8th month of the Ethiopic year.
74 * Constant for ግንቦት, the 9th month of the Ethiopic year.
79 * Constant for ሰኔ, the 10th month of the Ethiopic year.
[all …]
DGregorianCalendar.java34 * and the Julian calendar is the leap year rule. The Julian calendar specifies
45 * leap year rules were applied irregularly, and before 45 BC the Julian
48 * <p>Prior to the institution of the Gregorian calendar, New Year's Day was
54 * 53. Week 1 for a year is the earliest seven day period starting on
56 * <code>getMinimalDaysInFirstWeek()</code> days from that year. It thus
59 * Weeks between week 1 of one year and week 1 of the following year are
76 * week 1 of a year, week 1 of a month may be shorter than 7 days, need
117 * System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
142 * System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
185 * epochs which are used are January 1, year 1 (Gregorian), which is day 1
[all …]
DAnnualTimeZoneRule.java28 * The constant representing the maximum year used for designating a rule is permanent.
47 * @param startYear The first year when this rule takes effect.
48 * @param endYear The last year when this rule takes effect. If this
70 * Gets the first year when this rule takes effect.
72 * @return The start year of this rule. The year is in Gregorian calendar
80 * Gets the end year when this rule takes effect.
82 * @return The end year of this rule (inclusive). The year is in Gregorian calendar
90 * Gets the time when this rule takes effect in the given year.
92 * @param year The Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc.
98 * @return The time when this rule takes effect in the year, or
[all …]
DCECalendar.java28 { 1, 1, 5000000, 5000000 }, // YEAR
123 * @param year The value used to set the calendar's {@link #YEAR YEAR} time field.
130 protected CECalendar(int year, int month, int date) { in CECalendar() argument
132 this.set(year, month, date); in CECalendar()
150 * @param year The value used to set the calendar's {@link #YEAR YEAR} time field.
158 protected CECalendar(int year, int month, int date, int hour, in CECalendar() argument
162 this.set(year, month, date, hour, minute, second); in CECalendar()
178 * Return JD of start of given month/extended year
198 * year of this calendar system. Subclasses should override this
206 // an intercalary month at the end of the year of 5 or 6 days, depending whether in handleGetMonthLength()
[all …]
DPersianCalendar.java24 * in various ways, except its leap year rule, which is determined
25 * astronomically. The Persian year starts around the March equinox.
35 * The official rule for determination of the beginning of the Persian year
42 * expected that for about one year in every twenty-four years, the Afghan
47 * here, commonly known as the 33-year cycle rule, matches the astronomical
50 * commonly known algorithm, the 2820-year cycle, has been incorrectly
51 * designed to follow the tropical year instead of the spring equinoctial
52 * year, and fails to match the astronomical one as early as 2025 CE.
92 // len2 length of month in a leap year
93 // st days in year before start of month
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/
DIndianCalendar.java47 * So When its a leap year in Gregorian calendar then Chaitra has 31 days.
50 * Years are counted in the Saka Era, which starts its year 0 in 78AD (by gregorian calendar).
74 * Constant for Chaitra, the 1st month of the Indian year.
80 * Constant for Vaisakha, the 2nd month of the Indian year.
86 * Constant for Jyaistha, the 3rd month of the Indian year.
92 * Constant for Asadha, the 4th month of the Indian year.
98 * Constant for Sravana, the 5th month of the Indian year.
104 * Constant for Bhadra, the 6th month of the Indian year.
110 * Constant for Asvina, the 7th month of the Indian year.
116 * Constant for Kartika, the 8th month of the Indian year.
[all …]
DCopticCalendar.java32 * the 1st month of the Coptic year.
39 * the 2nd month of the Coptic year.
46 * the 3rd month of the Coptic year.
53 * the 4th month of the Coptic year.
60 * the 5th month of the Coptic year.
67 * the 6th month of the Coptic year.
74 * the 7th month of the Coptic year.
81 * the 8th month of the Coptic year.
88 * the 9th month of the Coptic year.
95 * the 10th month of the Coptic year.
[all …]
DHebrewCalendar.java25 * solar year (approximately 365.24 days) is not an even multiple of
28 * interesting, the start of a year can be delayed by up to three days
30 * to prevent certain illegal year lengths. Finally, the lengths of certain
31 * months can vary depending on the number of days in the year.
35 * not come at the end of the year, calculations involving
86 * Constant for Tishri, the 1st month of the Hebrew year.
92 * Constant for Heshvan, the 2nd month of the Hebrew year.
98 * Constant for Kislev, the 3rd month of the Hebrew year.
104 * Constant for Tevet, the 4th month of the Hebrew year.
110 * Constant for Shevat, the 5th month of the Hebrew year.
[all …]
DGregorianCalendar.java33 * and the Julian calendar is the leap year rule. The Julian calendar specifies
44 * leap year rules were applied irregularly, and before 45 BC the Julian
47 * <p>Prior to the institution of the Gregorian calendar, New Year's Day was
53 * 53. Week 1 for a year is the earliest seven day period starting on
55 * <code>getMinimalDaysInFirstWeek()</code> days from that year. It thus
58 * Weeks between week 1 of one year and week 1 of the following year are
75 * week 1 of a year, week 1 of a month may be shorter than 7 days, need
116 * System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
141 * System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
185 * epochs which are used are January 1, year 1 (Gregorian), which is day 1
[all …]
DEthiopicCalendar.java34 * Constant for መስከረም, the 1st month of the Ethiopic year.
40 * Constant for ጥቅምት, the 2nd month of the Ethiopic year.
46 * Constant for ኅዳር, the 3rd month of the Ethiopic year.
52 * Constant for ታኅሣሥ, the 4th month of the Ethiopic year.
58 * Constant for ጥር, the 5th month of the Ethiopic year.
64 * Constant for የካቲት, the 6th month of the Ethiopic year.
70 * Constant for መጋቢት, the 7th month of the Ethiopic year.
76 * Constant for ሚያዝያ, the 8th month of the Ethiopic year.
82 * Constant for ግንቦት, the 9th month of the Ethiopic year.
88 * Constant for ሰኔ, the 10th month of the Ethiopic year.
[all …]
DAnnualTimeZoneRule.java27 * The constant representing the maximum year used for designating a rule is permanent.
47 * @param startYear The first year when this rule takes effect.
48 * @param endYear The last year when this rule takes effect. If this
74 * Gets the first year when this rule takes effect.
76 * @return The start year of this rule. The year is in Gregorian calendar
86 * Gets the end year when this rule takes effect.
88 * @return The end year of this rule (inclusive). The year is in Gregorian calendar
98 * Gets the time when this rule takes effect in the given year.
100 * @param year The Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc.
106 * @return The time when this rule takes effect in the year, or
[all …]
DCECalendar.java27 { 1, 1, 5000000, 5000000 }, // YEAR
122 * @param year The value used to set the calendar's {@link #YEAR YEAR} time field.
129 protected CECalendar(int year, int month, int date) { in CECalendar() argument
131 this.set(year, month, date); in CECalendar()
149 * @param year The value used to set the calendar's {@link #YEAR YEAR} time field.
157 protected CECalendar(int year, int month, int date, int hour, in CECalendar() argument
161 this.set(year, month, date, hour, minute, second); in CECalendar()
176 * Return JD of start of given month/extended year
196 * year of this calendar system. Subclasses should override this
204 // an intercalary month at the end of the year of 5 or 6 days, depending whether in handleGetMonthLength()
[all …]
/external/icu/icu4c/source/test/testdata/
Dformat.txt29 …// or a calendar spec ERA=0,YEAR=1, etc.. applied to the calendar type specified by the loc…
39 "ERA=1,YEAR=2007,MONTH=AUGUST,DATE=8,HOUR_OF_DAY=18,MINUTE=54,SECOND=0",
46 "ERA=1,YEAR=98,MONTH=0,DATE=24",
54 "ERA=0,YEAR=2,MONTH=0,DATE=24",
96 "ERA=1,YEAR=2012,MONTH=OCTOBER,DATE=8,HOUR_OF_DAY=23,MINUTE=59,SECOND=0",
104 "ERA=1,YEAR=2012,MONTH=OCTOBER,DATE=8,HOUR_OF_DAY=23,MINUTE=59,SECOND=0",
119 "ERA=1,YEAR=2012,MONTH=OCTOBER,DATE=8,HOUR_OF_DAY=23,MINUTE=59,SECOND=0",
127 "ERA=1,YEAR=2012,MONTH=OCTOBER,DATE=8,HOUR_OF_DAY=23,MINUTE=59,SECOND=0",
151 "ERA=1,YEAR=2012,MONTH=OCTOBER,DATE=8,HOUR_OF_DAY=23,MINUTE=59,SECOND=0",
159 "ERA=1,YEAR=2012,MONTH=OCTOBER,DATE=8,HOUR_OF_DAY=23,MINUTE=59,SECOND=0",
[all …]
Dcalendar.txt28 // "0/1/1912/june/4 == gregorian year=1912, ERA=AD, same month, same day
31 "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw
32 "ERA=1,YEAR=1912,MONTH=,DATE=" // greg
36 "ERA=1,YEAR=3,MONTH=FEBRUARY,DATE=12", // tw
37 "ERA=1,YEAR=1914,MONTH=,DATE=" // greg
41 "ERA=1,YEAR=96,MONTH=FEBRUARY,DATE=12", // tw
42 "ERA=1,YEAR=2007,MONTH=,DATE=" // greg
48 "ERA=0,YEAR=2,MONTH=JANUARY,DATE=24", // tw
49 "ERA=1,YEAR=1910,MONTH=JANUARY,DATE=24", // greg
57 "YEAR=1964,MONTH=8,DATE=4", // greg
[all …]
/external/icu/icu4c/source/i18n/
Dgregoimp.h95 #define kJan1_1JulianDay 1721426 // January 1, year 1 (Gregorian)
140 * Return TRUE if the given year is a leap year.
141 * @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc.
142 * @return TRUE if the year is a leap year
144 static inline UBool isLeapYear(int32_t year);
148 * @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc.
152 static inline int8_t monthLength(int32_t year, int32_t month);
156 * @param y the extended year
163 * Convert a year, month, and day-of-month, given in the proleptic
165 * @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc.
[all …]
Dhebrwcal.cpp44 { -5000000, -5000000, 5000000, 5000000}, // YEAR
71 * Due to the rules for postponing the start of the year to avoid having
72 * certain holidays fall on the sabbath, the year can end up being three
93 * The cumulative # of days to the end of each month in a non-leap year
117 * The cumulative # of days to the end of each month in a leap year
228 int32_t year = get(UCAL_YEAR, status); in add() local
234 if (acrossAdar1 && month>=ADAR_1 && !isLeapYear(year)) { in add()
241 ++year; in add()
248 if (acrossAdar1 && month<=ADAR_1 && !isLeapYear(year)) { in add()
255 --year; in add()
[all …]
/external/python/cpython2/Doc/library/
Dcalendar.rst49 .. method:: itermonthdates(year, month)
51 Return an iterator for the month *month* (1--12) in the year *year*. This
57 .. method:: itermonthdays2(year, month)
59 Return an iterator for the month *month* in the year *year* similar to
64 .. method:: itermonthdays(year, month)
66 Return an iterator for the month *month* in the year *year* similar to
70 .. method:: monthdatescalendar(year, month)
72 Return a list of the weeks in the month *month* of the *year* as full
76 .. method:: monthdays2calendar(year, month)
78 Return a list of the weeks in the month *month* of the *year* as full
[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/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/
DGrego.java58 * Return true if the given year is a leap year.
59 * @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc.
60 * @return true if the year is a leap year
62 public static final boolean isLeapYear(int year) { in isLeapYear() argument
63 // year&0x3 == year%4 in isLeapYear()
64 return ((year&0x3) == 0) && ((year%100 != 0) || (year%400 == 0)); in isLeapYear()
69 * @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc.
73 public static final int monthLength(int year, int month) { in monthLength() argument
74 return MONTH_LENGTH[month + (isLeapYear(year) ? 12 : 0)]; in monthLength()
79 * @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc.
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/impl/
DGrego.java60 * Return true if the given year is a leap year.
61 * @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc.
62 * @return true if the year is a leap year
64 public static final boolean isLeapYear(int year) { in isLeapYear() argument
65 // year&0x3 == year%4 in isLeapYear()
66 return ((year&0x3) == 0) && ((year%100 != 0) || (year%400 == 0)); in isLeapYear()
71 * @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc.
75 public static final int monthLength(int year, int month) { in monthLength() argument
76 return MONTH_LENGTH[month + (isLeapYear(year) ? 12 : 0)]; in monthLength()
81 * @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc.
[all …]

12345678910>>...66