/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/ |
unbirthday.py | 14 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
[all...] |
/external/python/cpython2/Demo/scripts/ |
unbirthday.py | 14 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 [all...] |
/external/protobuf/src/google/protobuf/stubs/ |
time.cc | 27 // Count the seconds from the given year (start at Jan 1, 00:00) to 100 years 29 int64 SecondsPer100Years(int year) { 30 if (year % 400 == 0 || year % 400 > 300) { 37 // Count the seconds from the given year (start at Jan 1, 00:00) to 4 years 39 int64 SecondsPer4Years(int year) { 40 if ((year % 100 == 0 || year % 100 > 96) && 41 !(year % 400 == 0 || year % 400 > 396)) 95 int year = 1; local 217 int year = 1; local [all...] |
/external/icu/android_icu4j/src/main/java/android/icu/util/ |
HebrewCalendar.java | 26 * 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. 436 int year = get(YEAR); local 516 int year = get(YEAR); local 771 int year = (int)((19 * m + 234) \/ 235) + 1; \/\/ Years (approx) local 808 int year; local [all...] |
BuddhistCalendar.java | 23 * except for the year and era. Years are numbered since the birth of the 136 * @param year The value used to set the calendar's {@link #YEAR YEAR} time field. 143 public BuddhistCalendar(int year, int month, int date) { 144 super(year, month, date); 151 * @param year The value used to set the calendar's {@link #YEAR YEAR} time field. 164 public BuddhistCalendar(int year, int month, int date, int hour 188 int year; local [all...] |
CopticCalendar.java | 32 * 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. 252 int era, year; local [all...] |
IndianCalendar.java | 48 * 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. 289 int year; local 499 int year, month, day; local [all...] |
TaiwanCalendar.java | 21 * except for the year and era. Years are numbered since 1912 AD (Gregorian). 137 * @param year The value used to set the calendar's {@link #YEAR YEAR} time field. 144 public TaiwanCalendar(int year, int month, int date) { 145 super(year, month, date); 152 * @param year The value used to set the calendar's {@link #YEAR YEAR} time field. 161 public TaiwanCalendar(int year, int month, int date, int hour 186 int year = GREGORIAN_EPOCH; local [all...] |
AnnualTimeZoneRule.java | 28 * 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 182 int year = fields[0]; local 199 int year = fields[0]; local [all...] |
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/ |
HebrewCalendar.java | 25 * 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. 459 int year = get(YEAR); local 540 int year = get(YEAR); local 797 int year = (int)((19 * m + 234) \/ 235) + 1; \/\/ Years (approx) local 835 int year; local [all...] |
BuddhistCalendar.java | 22 * except for the year and era. Years are numbered since the birth of the 144 * @param year The value used to set the calendar's {@link #YEAR YEAR} time field. 152 public BuddhistCalendar(int year, int month, int date) { 153 super(year, month, date); 160 * @param year The value used to set the calendar's {@link #YEAR YEAR} time field. 174 public BuddhistCalendar(int year, int month, int date, int hour 199 int year; local [all...] |
CopticCalendar.java | 32 * 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. 273 int era, year; local [all...] |
IndianCalendar.java | 47 * 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. 313 int year; local 528 int year, month, day; local [all...] |
TaiwanCalendar.java | 20 * except for the year and era. Years are numbered since 1912 AD (Gregorian). 147 * @param year The value used to set the calendar's {@link #YEAR YEAR} time field. 155 public TaiwanCalendar(int year, int month, int date) { 156 super(year, month, date); 163 * @param year The value used to set the calendar's {@link #YEAR YEAR} time field. 173 public TaiwanCalendar(int year, int month, int date, int hour 199 int year = GREGORIAN_EPOCH; local [all...] |
/external/swiftshader/third_party/LLVM/utils/ |
parseNLT.pl | 13 $year = $3; 23 { print "\n$day $mon $year $prefix/$output"; } 34 { print "\n$day $mon $year $prefix/$output"; $output = ""; }
|
/frameworks/base/core/java/android/widget/ |
DatePickerController.java | 28 void onYearSelected(int year);
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/ |
Dates.py | 3 # 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
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
[all...] |
/external/python/cpython2/Demo/classes/ |
Dates.py | 3 # 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 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 [all...] |
/external/icu/icu4c/source/i18n/ |
gregoimp.h | 95 #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 [all...] |
/external/ltp/testcases/open_posix_testsuite/conformance/definitions/time_h/ |
2-1-buildonly.c | 16 int week, year, dst; local 25 year = t.tm_yday;
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
TCKHijrahChronology.java | 149 public void test_badDates(int year, int month, int dom) { 150 HijrahChronology.INSTANCE.date(year, month, dom); 156 int year = 1435; local 157 int lengthOfYear = HijrahChronology.INSTANCE.dateYearDay(year, 1).lengthOfYear(); 158 HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(year, lengthOfYear + 1); 192 int year = HijrahChronology.INSTANCE.prolepticYear(era, 1); local 234 assertEquals(fieldValues.get(ChronoField.YEAR), (Long) 1343L); 242 fieldValues.put(ChronoField.YEAR, 1343L); 246 assertEquals(fieldValues.get(ChronoField.YEAR), (Long) 1343L); 267 assertEquals(fieldValues.get(ChronoField.YEAR), (style == ResolverStyle.STRICT) ? null : (Long) 1343L) 295 final int year = 1434; local 439 final int year = 1343; local [all...] |
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/field/datetime/ |
DateTime.java | 34 private final int year; field in class:DateTime 43 this.year = convertToYear(yearString); 44 this.date = convertToDate(year, month, day, hour, minute, second, timeZone); 54 int year = Integer.parseInt(yearString); local 58 if (year >= 0 && year < 50) 59 return 2000 + year; 61 return 1900 + year; 63 return 1900 + year; 65 return year; [all...] |
/libcore/ojluni/src/main/java/sun/util/calendar/ |
BaseCalendar.java | 63 // The base Gregorian year of FIXED_DATES[] 161 // Cache for the fixed date of January 1 and year length of the 168 protected final boolean hit(int year) { 169 return year == cachedYear; 184 protected void setCache(int year, long jan1, int len) { 185 cachedYear = year; 274 int year = bdate.getNormalizedYear(); local 278 year -= (int)((xm / 12) + 1); 280 bdate.setNormalizedYear(year); 283 year += (int)((month - 1) / 12) 421 int year; local 495 int year; local [all...] |
/external/icu/android_icu4j/src/main/java/android/icu/impl/ |
Grego.java | 60 * 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) { 65 // year&0x3 == year%4 66 return ((year&0x3) == 0) && ((year%100 != 0) || (year%400 == 0)) 132 int year = (int)(400 * n400 + 100 * n100 + 4 * n4 + n1); local [all...] |
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/ |
Grego.java | 58 * 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) { 63 // year&0x3 == year%4 64 return ((year&0x3) == 0) && ((year%100 != 0) || (year%400 == 0)) 130 int year = (int)(400 * n400 + 100 * n100 + 4 * n4 + n1); local [all...] |