Lines Matching defs:year

39      * When parsing a date without a year, the system assumes 1970, which wasn't a leap-year.
40 * Let's add a one-off hack for that day of the year
68 * @param mustContainYear If true, the string is parsed as a date containing a year. If false,
69 * the string is parsed into a valid date even if the year field is missing.
114 private static final Calendar getUtcDate(int year, int month, int dayOfMonth) {
117 calendar.set(Calendar.YEAR, year);
124 // use the Calendar.YEAR field to track whether or not the year is set instead of
199 * Returns a SimpleDateFormat object without the year fields by using a regular expression
200 * to eliminate the year in the string pattern. In the rare occurence that the resulting
208 // Determine the correct regex pattern for year.
213 // Eliminate the substring in pattern that matches the format for that of year
222 * Given a calendar (possibly containing only a day of the year), returns the earliest possible
224 * does not contain a year, or the date converted to the local time zone (if the date contains
225 * a year.
228 * @return If date does not contain a year (year < 1900), returns the next earliest anniversary
249 // Convert from the UTC date to the local date. Set the year to today's year if the
250 // there is no provided year (targetYear < 1900)
253 // If the anniversary's date is before the start of today and there is no year set,
254 // increment the year by 1 so that the returned date is always equal to or greater than
255 // today. If the day is a leap year, keep going until we get the next leap year anniversary
256 // Otherwise if there is already a year set, simply return the exact date.
261 // If the target date is not Feb 29, then set the anniversary to the next year.
262 // Otherwise, keep going until we find the next leap year (this is not guaranteed