Package com.squarespace.cldrengine.api
Class PersianDate
- java.lang.Object
-
- com.squarespace.cldrengine.api.CalendarDate
-
- com.squarespace.cldrengine.api.PersianDate
-
public class PersianDate extends CalendarDate
Construct a date using the rules of the Persian calendar. type: persian
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.squarespace.cldrengine.api.CalendarDate
CalendarDate.Swap
-
-
Constructor Summary
Constructors Constructor Description PersianDate(int firstDay, int minDays)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PersianDate
_initFromJD(long jd, long msDay, java.lang.String zoneId)
protected PersianDate
_initFromUnixEpoch(long epoch, java.lang.String zoneId)
CalendarDate
add(TimePeriod fields)
protected int
daysInMonth(long year, int month)
protected int
daysInYear(long year)
static PersianDate
fromUnixEpoch(long epoch, java.lang.String zoneId, int firstDay, int minDays)
protected void
initFields(long[] f)
protected int
monthCount()
protected long
monthStart(long eyear, double month, boolean useMonth)
long
relatedYear()
CalendarDate
subtract(TimePeriod fields)
java.lang.String
toString()
CalendarDate
withZone(java.lang.String zoneId)
-
Methods inherited from class com.squarespace.cldrengine.api.CalendarDate
_add, _addTime, _computeWeekFields, _diff, _rollup, _toString, checkJDRange, compare, computeBaseFields, computeWeekFields, dayOfMonth, dayOfWeek, dayOfWeekInMonth, dayOfYear, difference, era, extendedYear, fieldOfVisualDifference, firstDayOfWeek, getRelativeField, hour, hourOfDay, initFromJD, initFromUnixEpoch, invertPeriod, isAM, isDaylightSavings, isLeapYear, jdFromUnixEpoch, julianDay, largestRelativeField, metaZoneId, milliseconds, millisecondsInDay, minDaysInFirstWeek, minute, modifiedJulianDay, month, ordinalDayOfWeek, relativeTime, second, splitfrac, swap, timePeriodFieldFlags, timeZoneAbbr, timeZoneId, timeZoneOffset, timeZoneStableId, type, unixEpoch, unixEpochFromJD, utcfields, weekNumber, weekOfMonth, weekOfYear, weekOfYearISO, year, yearLength, yearOfWeekOfYear, yearOfWeekOfYearISO
-
-
-
-
Method Detail
-
relatedYear
public long relatedYear()
- Overrides:
relatedYear
in classCalendarDate
-
add
public CalendarDate add(TimePeriod fields)
- Specified by:
add
in classCalendarDate
-
subtract
public CalendarDate subtract(TimePeriod fields)
- Specified by:
subtract
in classCalendarDate
-
withZone
public CalendarDate withZone(java.lang.String zoneId)
- Specified by:
withZone
in classCalendarDate
-
daysInMonth
protected int daysInMonth(long year, int month)
- Specified by:
daysInMonth
in classCalendarDate
-
daysInYear
protected int daysInYear(long year)
- Specified by:
daysInYear
in classCalendarDate
-
monthCount
protected int monthCount()
- Specified by:
monthCount
in classCalendarDate
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
fromUnixEpoch
public static PersianDate fromUnixEpoch(long epoch, java.lang.String zoneId, int firstDay, int minDays)
-
_initFromUnixEpoch
protected PersianDate _initFromUnixEpoch(long epoch, java.lang.String zoneId)
-
_initFromJD
protected PersianDate _initFromJD(long jd, long msDay, java.lang.String zoneId)
-
initFields
protected void initFields(long[] f)
- Specified by:
initFields
in classCalendarDate
-
monthStart
protected long monthStart(long eyear, double month, boolean useMonth)
- Specified by:
monthStart
in classCalendarDate
-
-