/** * Returns {@code true} if the month is before year in the date formatter in current locale. */ protected boolean isMonthBeforeYear() { String monthAndYearPattern = getMonthAndYearFormatter().getPattern(); for (int i = 0; i < monthAndYearPattern.length(); ++i) { switch (monthAndYearPattern.charAt(i)) { case 'y': return false; case 'M': case 'L': return true; } } return true; }
/** * Format the current month and year in the current locale. For example, "Jan 2013" in English. * * @return the formatted month and year */ public String formatCurrentMonthAndYear() { return getMonthAndYearFormatter().format(getCurrentMonth()); }
/** * Returns {@code true} if the month is before year in the date formatter in current locale. */ protected boolean isMonthBeforeYear() { String monthAndYearPattern = getMonthAndYearFormatter().getPattern(); for (int i = 0; i < monthAndYearPattern.length(); ++i) { switch (monthAndYearPattern.charAt(i)) { case 'y': return false; case 'M': case 'L': return true; } } return true; }
/** * Returns {@code true} if the month is before year in the date formatter in current locale. */ protected boolean isMonthBeforeYear() { String monthAndYearPattern = getMonthAndYearFormatter().getPattern(); for (int i = 0; i < monthAndYearPattern.length(); ++i) { switch (monthAndYearPattern.charAt(i)) { case 'y': return false; case 'M': case 'L': return true; } } return true; }
/** * Format the current month and year in the current locale. For example, "Jan 2013" in English. * * @return the formatted month and year */ public String formatCurrentMonthAndYear() { return getMonthAndYearFormatter().format(getCurrentMonth()); }
/** * Format the current month and year in the current locale. For example, "Jan 2013" in English. * * @return the formatted month and year */ public String formatCurrentMonthAndYear() { return getMonthAndYearFormatter().format(getCurrentMonth()); }