Java Code Examples for sun.util.calendar.BaseCalendar#MARCH
The following examples show how to use
sun.util.calendar.BaseCalendar#MARCH .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GregorianCalendar.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Determines if the given year is a leap year. Returns <code>true</code> if * the given year is a leap year. To specify BC year numbers, * <code>1 - year number</code> must be given. For example, year BC 4 is * specified as -3. * * @param year the given year. * @return <code>true</code> if the given year is a leap year; <code>false</code> otherwise. */ public boolean isLeapYear(int year) { if ((year & 3) != 0) { return false; } if (year > gregorianCutoverYear) { return (year%100 != 0) || (year%400 == 0); // Gregorian } if (year < gregorianCutoverYearJulian) { return true; // Julian } boolean gregorian; // If the given year is the Gregorian cutover year, we need to // determine which calendar system to be applied to February in the year. if (gregorianCutoverYear == gregorianCutoverYearJulian) { BaseCalendar.Date d = getCalendarDate(gregorianCutoverDate); // Gregorian gregorian = d.getMonth() < BaseCalendar.MARCH; } else { gregorian = year == gregorianCutoverYear; } return gregorian ? (year%100 != 0) || (year%400 == 0) : true; }
Example 2
Source File: GregorianCalendar.java From j2objc with Apache License 2.0 | 6 votes |
/** * Determines if the given year is a leap year. Returns <code>true</code> if * the given year is a leap year. To specify BC year numbers, * <code>1 - year number</code> must be given. For example, year BC 4 is * specified as -3. * * @param year the given year. * @return <code>true</code> if the given year is a leap year; <code>false</code> otherwise. */ public boolean isLeapYear(int year) { if ((year & 3) != 0) { return false; } if (year > gregorianCutoverYear) { return (year%100 != 0) || (year%400 == 0); // Gregorian } if (year < gregorianCutoverYearJulian) { return true; // Julian } boolean gregorian; // If the given year is the Gregorian cutover year, we need to // determine which calendar system to be applied to February in the year. if (gregorianCutoverYear == gregorianCutoverYearJulian) { BaseCalendar.Date d = getCalendarDate(gregorianCutoverDate); // Gregorian gregorian = d.getMonth() < BaseCalendar.MARCH; } else { gregorian = year == gregorianCutoverYear; } return gregorian ? (year%100 != 0) || (year%400 == 0) : true; }
Example 3
Source File: GregorianCalendar.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
/** * Determines if the given year is a leap year. Returns <code>true</code> if * the given year is a leap year. To specify BC year numbers, * <code>1 - year number</code> must be given. For example, year BC 4 is * specified as -3. * * @param year the given year. * @return <code>true</code> if the given year is a leap year; <code>false</code> otherwise. */ public boolean isLeapYear(int year) { if ((year & 3) != 0) { return false; } if (year > gregorianCutoverYear) { return (year%100 != 0) || (year%400 == 0); // Gregorian } if (year < gregorianCutoverYearJulian) { return true; // Julian } boolean gregorian; // If the given year is the Gregorian cutover year, we need to // determine which calendar system to be applied to February in the year. if (gregorianCutoverYear == gregorianCutoverYearJulian) { BaseCalendar.Date d = getCalendarDate(gregorianCutoverDate); // Gregorian gregorian = d.getMonth() < BaseCalendar.MARCH; } else { gregorian = year == gregorianCutoverYear; } return gregorian ? (year%100 != 0) || (year%400 == 0) : true; }
Example 4
Source File: GregorianCalendar.java From jdk-1.7-annotated with Apache License 2.0 | 6 votes |
/** * Determines if the given year is a leap year. Returns <code>true</code> if * the given year is a leap year. To specify BC year numbers, * <code>1 - year number</code> must be given. For example, year BC 4 is * specified as -3. * * @param year the given year. * @return <code>true</code> if the given year is a leap year; <code>false</code> otherwise. */ public boolean isLeapYear(int year) { if ((year & 3) != 0) { return false; } if (year > gregorianCutoverYear) { return (year%100 != 0) || (year%400 == 0); // Gregorian } if (year < gregorianCutoverYearJulian) { return true; // Julian } boolean gregorian; // If the given year is the Gregorian cutover year, we need to // determine which calendar system to be applied to February in the year. if (gregorianCutoverYear == gregorianCutoverYearJulian) { BaseCalendar.Date d = getCalendarDate(gregorianCutoverDate); // Gregorian gregorian = d.getMonth() < BaseCalendar.MARCH; } else { gregorian = year == gregorianCutoverYear; } return gregorian ? (year%100 != 0) || (year%400 == 0) : true; }
Example 5
Source File: GregorianCalendar.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Determines if the given year is a leap year. Returns <code>true</code> if * the given year is a leap year. To specify BC year numbers, * <code>1 - year number</code> must be given. For example, year BC 4 is * specified as -3. * * @param year the given year. * @return <code>true</code> if the given year is a leap year; <code>false</code> otherwise. */ public boolean isLeapYear(int year) { if ((year & 3) != 0) { return false; } if (year > gregorianCutoverYear) { return (year%100 != 0) || (year%400 == 0); // Gregorian } if (year < gregorianCutoverYearJulian) { return true; // Julian } boolean gregorian; // If the given year is the Gregorian cutover year, we need to // determine which calendar system to be applied to February in the year. if (gregorianCutoverYear == gregorianCutoverYearJulian) { BaseCalendar.Date d = getCalendarDate(gregorianCutoverDate); // Gregorian gregorian = d.getMonth() < BaseCalendar.MARCH; } else { gregorian = year == gregorianCutoverYear; } return gregorian ? (year%100 != 0) || (year%400 == 0) : true; }
Example 6
Source File: GregorianCalendar.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
/** * Determines if the given year is a leap year. Returns <code>true</code> if * the given year is a leap year. To specify BC year numbers, * <code>1 - year number</code> must be given. For example, year BC 4 is * specified as -3. * * @param year the given year. * @return <code>true</code> if the given year is a leap year; <code>false</code> otherwise. */ public boolean isLeapYear(int year) { if ((year & 3) != 0) { return false; } if (year > gregorianCutoverYear) { return (year%100 != 0) || (year%400 == 0); // Gregorian } if (year < gregorianCutoverYearJulian) { return true; // Julian } boolean gregorian; // If the given year is the Gregorian cutover year, we need to // determine which calendar system to be applied to February in the year. if (gregorianCutoverYear == gregorianCutoverYearJulian) { BaseCalendar.Date d = getCalendarDate(gregorianCutoverDate); // Gregorian gregorian = d.getMonth() < BaseCalendar.MARCH; } else { gregorian = year == gregorianCutoverYear; } return gregorian ? (year%100 != 0) || (year%400 == 0) : true; }
Example 7
Source File: GregorianCalendar.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Determines if the given year is a leap year. Returns <code>true</code> if * the given year is a leap year. To specify BC year numbers, * <code>1 - year number</code> must be given. For example, year BC 4 is * specified as -3. * * @param year the given year. * @return <code>true</code> if the given year is a leap year; <code>false</code> otherwise. */ public boolean isLeapYear(int year) { if ((year & 3) != 0) { return false; } if (year > gregorianCutoverYear) { return (year%100 != 0) || (year%400 == 0); // Gregorian } if (year < gregorianCutoverYearJulian) { return true; // Julian } boolean gregorian; // If the given year is the Gregorian cutover year, we need to // determine which calendar system to be applied to February in the year. if (gregorianCutoverYear == gregorianCutoverYearJulian) { BaseCalendar.Date d = getCalendarDate(gregorianCutoverDate); // Gregorian gregorian = d.getMonth() < BaseCalendar.MARCH; } else { gregorian = year == gregorianCutoverYear; } return gregorian ? (year%100 != 0) || (year%400 == 0) : true; }
Example 8
Source File: GregorianCalendar.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Determines if the given year is a leap year. Returns <code>true</code> if * the given year is a leap year. To specify BC year numbers, * <code>1 - year number</code> must be given. For example, year BC 4 is * specified as -3. * * @param year the given year. * @return <code>true</code> if the given year is a leap year; <code>false</code> otherwise. */ public boolean isLeapYear(int year) { if ((year & 3) != 0) { return false; } if (year > gregorianCutoverYear) { return (year%100 != 0) || (year%400 == 0); // Gregorian } if (year < gregorianCutoverYearJulian) { return true; // Julian } boolean gregorian; // If the given year is the Gregorian cutover year, we need to // determine which calendar system to be applied to February in the year. if (gregorianCutoverYear == gregorianCutoverYearJulian) { BaseCalendar.Date d = getCalendarDate(gregorianCutoverDate); // Gregorian gregorian = d.getMonth() < BaseCalendar.MARCH; } else { gregorian = year == gregorianCutoverYear; } return gregorian ? (year%100 != 0) || (year%400 == 0) : true; }
Example 9
Source File: GregorianCalendar.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Determines if the given year is a leap year. Returns <code>true</code> if * the given year is a leap year. To specify BC year numbers, * <code>1 - year number</code> must be given. For example, year BC 4 is * specified as -3. * * @param year the given year. * @return <code>true</code> if the given year is a leap year; <code>false</code> otherwise. */ public boolean isLeapYear(int year) { if ((year & 3) != 0) { return false; } if (year > gregorianCutoverYear) { return (year%100 != 0) || (year%400 == 0); // Gregorian } if (year < gregorianCutoverYearJulian) { return true; // Julian } boolean gregorian; // If the given year is the Gregorian cutover year, we need to // determine which calendar system to be applied to February in the year. if (gregorianCutoverYear == gregorianCutoverYearJulian) { BaseCalendar.Date d = getCalendarDate(gregorianCutoverDate); // Gregorian gregorian = d.getMonth() < BaseCalendar.MARCH; } else { gregorian = year == gregorianCutoverYear; } return gregorian ? (year%100 != 0) || (year%400 == 0) : true; }
Example 10
Source File: GregorianCalendar.java From Java8CN with Apache License 2.0 | 6 votes |
/** * Determines if the given year is a leap year. Returns <code>true</code> if * the given year is a leap year. To specify BC year numbers, * <code>1 - year number</code> must be given. For example, year BC 4 is * specified as -3. * * @param year the given year. * @return <code>true</code> if the given year is a leap year; <code>false</code> otherwise. */ public boolean isLeapYear(int year) { if ((year & 3) != 0) { return false; } if (year > gregorianCutoverYear) { return (year%100 != 0) || (year%400 == 0); // Gregorian } if (year < gregorianCutoverYearJulian) { return true; // Julian } boolean gregorian; // If the given year is the Gregorian cutover year, we need to // determine which calendar system to be applied to February in the year. if (gregorianCutoverYear == gregorianCutoverYearJulian) { BaseCalendar.Date d = getCalendarDate(gregorianCutoverDate); // Gregorian gregorian = d.getMonth() < BaseCalendar.MARCH; } else { gregorian = year == gregorianCutoverYear; } return gregorian ? (year%100 != 0) || (year%400 == 0) : true; }
Example 11
Source File: GregorianCalendar.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
/** * Determines if the given year is a leap year. Returns <code>true</code> if * the given year is a leap year. To specify BC year numbers, * <code>1 - year number</code> must be given. For example, year BC 4 is * specified as -3. * * @param year the given year. * @return <code>true</code> if the given year is a leap year; <code>false</code> otherwise. */ public boolean isLeapYear(int year) { if ((year & 3) != 0) { return false; } if (year > gregorianCutoverYear) { return (year%100 != 0) || (year%400 == 0); // Gregorian } if (year < gregorianCutoverYearJulian) { return true; // Julian } boolean gregorian; // If the given year is the Gregorian cutover year, we need to // determine which calendar system to be applied to February in the year. if (gregorianCutoverYear == gregorianCutoverYearJulian) { BaseCalendar.Date d = getCalendarDate(gregorianCutoverDate); // Gregorian gregorian = d.getMonth() < BaseCalendar.MARCH; } else { gregorian = year == gregorianCutoverYear; } return gregorian ? (year%100 != 0) || (year%400 == 0) : true; }
Example 12
Source File: GregorianCalendar.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Determines if the given year is a leap year. Returns <code>true</code> if * the given year is a leap year. To specify BC year numbers, * <code>1 - year number</code> must be given. For example, year BC 4 is * specified as -3. * * @param year the given year. * @return <code>true</code> if the given year is a leap year; <code>false</code> otherwise. */ public boolean isLeapYear(int year) { if ((year & 3) != 0) { return false; } if (year > gregorianCutoverYear) { return (year%100 != 0) || (year%400 == 0); // Gregorian } if (year < gregorianCutoverYearJulian) { return true; // Julian } boolean gregorian; // If the given year is the Gregorian cutover year, we need to // determine which calendar system to be applied to February in the year. if (gregorianCutoverYear == gregorianCutoverYearJulian) { BaseCalendar.Date d = getCalendarDate(gregorianCutoverDate); // Gregorian gregorian = d.getMonth() < BaseCalendar.MARCH; } else { gregorian = year == gregorianCutoverYear; } return gregorian ? (year%100 != 0) || (year%400 == 0) : true; }
Example 13
Source File: GregorianCalendar.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Determines if the given year is a leap year. Returns {@code true} if * the given year is a leap year. To specify BC year numbers, * {@code 1 - year number} must be given. For example, year BC 4 is * specified as -3. * * @param year the given year. * @return {@code true} if the given year is a leap year; {@code false} otherwise. */ public boolean isLeapYear(int year) { if ((year & 3) != 0) { return false; } if (year > gregorianCutoverYear) { return (year%100 != 0) || (year%400 == 0); // Gregorian } if (year < gregorianCutoverYearJulian) { return true; // Julian } boolean gregorian; // If the given year is the Gregorian cutover year, we need to // determine which calendar system to be applied to February in the year. if (gregorianCutoverYear == gregorianCutoverYearJulian) { BaseCalendar.Date d = getCalendarDate(gregorianCutoverDate); // Gregorian gregorian = d.getMonth() < BaseCalendar.MARCH; } else { gregorian = year == gregorianCutoverYear; } return gregorian ? (year%100 != 0) || (year%400 == 0) : true; }
Example 14
Source File: GregorianCalendar.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Determines if the given year is a leap year. Returns <code>true</code> if * the given year is a leap year. To specify BC year numbers, * <code>1 - year number</code> must be given. For example, year BC 4 is * specified as -3. * * @param year the given year. * @return <code>true</code> if the given year is a leap year; <code>false</code> otherwise. */ public boolean isLeapYear(int year) { if ((year & 3) != 0) { return false; } if (year > gregorianCutoverYear) { return (year%100 != 0) || (year%400 == 0); // Gregorian } if (year < gregorianCutoverYearJulian) { return true; // Julian } boolean gregorian; // If the given year is the Gregorian cutover year, we need to // determine which calendar system to be applied to February in the year. if (gregorianCutoverYear == gregorianCutoverYearJulian) { BaseCalendar.Date d = getCalendarDate(gregorianCutoverDate); // Gregorian gregorian = d.getMonth() < BaseCalendar.MARCH; } else { gregorian = year == gregorianCutoverYear; } return gregorian ? (year%100 != 0) || (year%400 == 0) : true; }
Example 15
Source File: GregorianCalendar.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Determines if the given year is a leap year. Returns <code>true</code> if * the given year is a leap year. To specify BC year numbers, * <code>1 - year number</code> must be given. For example, year BC 4 is * specified as -3. * * @param year the given year. * @return <code>true</code> if the given year is a leap year; <code>false</code> otherwise. */ public boolean isLeapYear(int year) { if ((year & 3) != 0) { return false; } if (year > gregorianCutoverYear) { return (year%100 != 0) || (year%400 == 0); // Gregorian } if (year < gregorianCutoverYearJulian) { return true; // Julian } boolean gregorian; // If the given year is the Gregorian cutover year, we need to // determine which calendar system to be applied to February in the year. if (gregorianCutoverYear == gregorianCutoverYearJulian) { BaseCalendar.Date d = getCalendarDate(gregorianCutoverDate); // Gregorian gregorian = d.getMonth() < BaseCalendar.MARCH; } else { gregorian = year == gregorianCutoverYear; } return gregorian ? (year%100 != 0) || (year%400 == 0) : true; }
Example 16
Source File: GregorianCalendar.java From JDKSourceCode1.8 with MIT License | 6 votes |
/** * Determines if the given year is a leap year. Returns <code>true</code> if * the given year is a leap year. To specify BC year numbers, * <code>1 - year number</code> must be given. For example, year BC 4 is * specified as -3. * * @param year the given year. * @return <code>true</code> if the given year is a leap year; <code>false</code> otherwise. */ public boolean isLeapYear(int year) { if ((year & 3) != 0) { return false; } if (year > gregorianCutoverYear) { return (year%100 != 0) || (year%400 == 0); // Gregorian } if (year < gregorianCutoverYearJulian) { return true; // Julian } boolean gregorian; // If the given year is the Gregorian cutover year, we need to // determine which calendar system to be applied to February in the year. if (gregorianCutoverYear == gregorianCutoverYearJulian) { BaseCalendar.Date d = getCalendarDate(gregorianCutoverDate); // Gregorian gregorian = d.getMonth() < BaseCalendar.MARCH; } else { gregorian = year == gregorianCutoverYear; } return gregorian ? (year%100 != 0) || (year%400 == 0) : true; }
Example 17
Source File: GregorianCalendar.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Determines if the given year is a leap year. Returns <code>true</code> if * the given year is a leap year. To specify BC year numbers, * <code>1 - year number</code> must be given. For example, year BC 4 is * specified as -3. * * @param year the given year. * @return <code>true</code> if the given year is a leap year; <code>false</code> otherwise. */ public boolean isLeapYear(int year) { if ((year & 3) != 0) { return false; } if (year > gregorianCutoverYear) { return (year%100 != 0) || (year%400 == 0); // Gregorian } if (year < gregorianCutoverYearJulian) { return true; // Julian } boolean gregorian; // If the given year is the Gregorian cutover year, we need to // determine which calendar system to be applied to February in the year. if (gregorianCutoverYear == gregorianCutoverYearJulian) { BaseCalendar.Date d = getCalendarDate(gregorianCutoverDate); // Gregorian gregorian = d.getMonth() < BaseCalendar.MARCH; } else { gregorian = year == gregorianCutoverYear; } return gregorian ? (year%100 != 0) || (year%400 == 0) : true; }
Example 18
Source File: GregorianCalendar.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Determines if the given year is a leap year. Returns <code>true</code> if * the given year is a leap year. To specify BC year numbers, * <code>1 - year number</code> must be given. For example, year BC 4 is * specified as -3. * * @param year the given year. * @return <code>true</code> if the given year is a leap year; <code>false</code> otherwise. */ public boolean isLeapYear(int year) { if ((year & 3) != 0) { return false; } if (year > gregorianCutoverYear) { return (year%100 != 0) || (year%400 == 0); // Gregorian } if (year < gregorianCutoverYearJulian) { return true; // Julian } boolean gregorian; // If the given year is the Gregorian cutover year, we need to // determine which calendar system to be applied to February in the year. if (gregorianCutoverYear == gregorianCutoverYearJulian) { BaseCalendar.Date d = getCalendarDate(gregorianCutoverDate); // Gregorian gregorian = d.getMonth() < BaseCalendar.MARCH; } else { gregorian = year == gregorianCutoverYear; } return gregorian ? (year%100 != 0) || (year%400 == 0) : true; }
Example 19
Source File: GregorianCalendar.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
/** * Determines if the given year is a leap year. Returns <code>true</code> if * the given year is a leap year. To specify BC year numbers, * <code>1 - year number</code> must be given. For example, year BC 4 is * specified as -3. * * @param year the given year. * @return <code>true</code> if the given year is a leap year; <code>false</code> otherwise. */ public boolean isLeapYear(int year) { if ((year & 3) != 0) { return false; } if (year > gregorianCutoverYear) { return (year%100 != 0) || (year%400 == 0); // Gregorian } if (year < gregorianCutoverYearJulian) { return true; // Julian } boolean gregorian; // If the given year is the Gregorian cutover year, we need to // determine which calendar system to be applied to February in the year. if (gregorianCutoverYear == gregorianCutoverYearJulian) { BaseCalendar.Date d = getCalendarDate(gregorianCutoverDate); // Gregorian gregorian = d.getMonth() < BaseCalendar.MARCH; } else { gregorian = year == gregorianCutoverYear; } return gregorian ? (year%100 != 0) || (year%400 == 0) : true; }