public class JulianCalendarMetrics extends GregorianCalendarMetrics
CalendarMetrics.CalendarMetricsFactory| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CALENDAR_SCALE_ALIAS |
static java.lang.String |
CALENDAR_SCALE_NAME |
static CalendarMetrics.CalendarMetricsFactory |
FACTORY |
WEEKDAYSminDaysInFirstWeek, weekStart, weekStartInt| Constructor and Description |
|---|
JulianCalendarMetrics(Weekday weekStart,
int minDaysInFirstWeek)
Create calendar metrics for a Julian calendar with the given week numbering.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDayOfWeek(int year,
int yearDay)
Returns the day of week of the given year date.
|
int |
getWeekDayOfFirstYearDay(int year)
Get the weekday of the first day (which is January the 1st in a Gregorian Calendar) in the given year.
|
long |
toInstance(long timestamp,
java.util.TimeZone timeZone)
Converts a timestamp to an instance in the given
TimeZone. |
long |
toMillis(java.util.TimeZone timeZone,
int year,
int packedMonth,
int dayOfMonth,
int hours,
int minutes,
int seconds,
int millis)
Convert the given (local) date to milliseconds since the epoch using the given
TimeZone. |
getDayOfMonthOfYearDay, getDayOfYear, getDaysPerPackedMonth, getDaysPerYear, getMaxMonthDayNum, getMaxWeekNoNum, getMaxYearDayNum, getMonthAndDayOfYearDay, getMonthsPerYear, getPackedMonthOfYearDay, getWeekOfYear, getWeeksPerYear, getYearDayOfFirstWeekStart, getYearDayOfIsoYear, getYearDayOfWeekStart, getYearDaysForPackedMonthgetMonthsPerYear, isLeapMonth, monthNum, nextDay, nextDay, nextMonth, nextMonth, packedMonth, packedMonth, packedMonthToString, prevDay, prevDay, prevMonth, prevMonthdayOfMonth, equals, getDayOfWeek, getWeekOfYear, hashCode, monthAndDay, packedMonth, scaleEquals, setDayOfWeek, startOfWeek, toMillis, toString, validatepublic static final java.lang.String CALENDAR_SCALE_ALIAS
public static final CalendarMetrics.CalendarMetricsFactory FACTORY
public static final java.lang.String CALENDAR_SCALE_NAME
public JulianCalendarMetrics(Weekday weekStart, int minDaysInFirstWeek)
weekStart - The first day of the week.minDaysInFirstWeek - The minimal number of days in the first week.public int getDayOfWeek(int year,
int yearDay)
CalendarMetricsgetDayOfWeek in class CalendarMetricsyear - The year.yearDay - The day of the year.0 means Sunday and 6 means Saturday or the respective week days in the
respective calendar scale.public int getWeekDayOfFirstYearDay(int year)
CalendarMetricsgetWeekDayOfFirstYearDay in class GregorianCalendarMetricsyear - The year.public long toMillis(java.util.TimeZone timeZone,
int year,
int packedMonth,
int dayOfMonth,
int hours,
int minutes,
int seconds,
int millis)
CalendarMetricsTimeZone.toMillis in class GregorianCalendarMetricstimeZone - The time zone or null for floating dates (and all-day dates).year - The year.packedMonth - The packed month.dayOfMonth - The day of the month.hours - The hour of the day.minutes - The minutes.seconds - The seconds.millis - The milliseconds.public long toInstance(long timestamp,
java.util.TimeZone timeZone)
CalendarMetricsTimeZone.toInstance in class GregorianCalendarMetricstimestamp - The time in milliseconds since the epoch.timeZone - The time zone, may be null in which case UTC will be used.