Package com.squarespace.cldrengine.api
Interface Calendars
-
- All Known Implementing Classes:
CalendarsImpl
public interface Calendars
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
formatDate(CalendarDate date, DateFormatOptions options)
Formats a date-time value to string.java.lang.String
formatDateInterval(CalendarDate start, CalendarDate end, DateIntervalFormatOptions options)
Formats a date interval with a start and end.java.util.List<Part>
formatDateIntervalToParts(CalendarDate start, CalendarDate end, DateIntervalFormatOptions options)
Formats a date-time interval for the given skeleton to an array of parts.java.lang.String
formatDateRaw(CalendarDate date, DateRawFormatOptions options)
Formats a date-time value to string using a raw date-time pattern.java.util.List<Part>
formatDateToParts(CalendarDate date, DateFormatOptions options)
Formats a date-time value to an array of parts.java.lang.String
formatRelativeTime(CalendarDate start, CalendarDate end, RelativeTimeFormatOptions options)
Formats the relative time from a start to end date.java.lang.String
formatRelativeTimeField(Decimal value, RelativeTimeFieldType field, RelativeTimeFieldFormatOptions options)
Formats a relative time field to string.java.lang.String
resolveTimeZoneId(java.lang.String zoneId)
Resolve a timezone id / alias to the official TZDB identifier.TimeData
timeData()
Return information about the locale's preferred and allowed time cycles.java.util.List<java.lang.String>
timeZoneIds()
Return an array containing the official TZDB timezone identifiers.TimeZoneInfo
timeZoneInfo(java.lang.String zoneId)
Return additional information for a timezone id, including the localized exemplar city.BuddhistDate
toBuddhistDate(long epoch, java.lang.String zoneId)
Convert a date time into a date in the Buddhist calendar, with locale-specific week data.BuddhistDate
toBuddhistDate(CalendarDate date)
Convert a date time into a date in the Buddhist calendar, with locale-specific week data.BuddhistDate
toBuddhistDate(java.util.Date date, java.lang.String zoneId)
Convert a date time into a date in the Buddhist calendar, with locale-specific week data.GregorianDate
toGregorianDate(long epoch, java.lang.String zoneId)
Convert a date time into a date in the Gregorian calendar, with locale-specific week data.GregorianDate
toGregorianDate(CalendarDate date)
Convert a date time into a date in the Gregorian calendar, with locale-specific week data.GregorianDate
toGregorianDate(java.util.Date date, java.lang.String zoneId)
Convert a date time into a date in the Gregorian calendar, with locale-specific week data.ISO8601Date
toISO8601Date(long epoch, java.lang.String zoneId)
Convert a date time into a date in the ISO-8601 calendar, with ISO week data.ISO8601Date
toISO8601Date(CalendarDate date)
Convert a date time into a date in the ISO-8601 calendar, with ISO week data.ISO8601Date
toISO8601Date(java.util.Date date, java.lang.String zoneId)
Convert a date time into a date in the ISO-8601 calendar, with ISO week data.JapaneseDate
toJapaneseDate(long epoch, java.lang.String zoneId)
Convert a date time into a date in the Japanese calendar, with locale-specific week data.JapaneseDate
toJapaneseDate(CalendarDate date)
Convert a date time into a date in the Japanese calendar, with locale-specific week data.JapaneseDate
toJapaneseDate(java.util.Date date, java.lang.String zoneId)
Convert a date time into a date in the Japanese calendar, with locale-specific week data.PersianDate
toPersianDate(long epoch, java.lang.String zoneId)
Convert a date time into a date in the Persian calendar, with locale-specific week data.PersianDate
toPersianDate(CalendarDate date)
Convert a date time into a date in the Persian calendar, with locale-specific week data.PersianDate
toPersianDate(java.util.Date date, java.lang.String zoneId)
Convert a date time into a date in the Persian calendar, with locale-specific week data.
-
-
-
Method Detail
-
toBuddhistDate
BuddhistDate toBuddhistDate(long epoch, java.lang.String zoneId)
Convert a date time into a date in the Buddhist calendar, with locale-specific week data.
-
toBuddhistDate
BuddhistDate toBuddhistDate(java.util.Date date, java.lang.String zoneId)
Convert a date time into a date in the Buddhist calendar, with locale-specific week data.
-
toBuddhistDate
BuddhistDate toBuddhistDate(CalendarDate date)
Convert a date time into a date in the Buddhist calendar, with locale-specific week data.
-
toGregorianDate
GregorianDate toGregorianDate(long epoch, java.lang.String zoneId)
Convert a date time into a date in the Gregorian calendar, with locale-specific week data.
-
toGregorianDate
GregorianDate toGregorianDate(java.util.Date date, java.lang.String zoneId)
Convert a date time into a date in the Gregorian calendar, with locale-specific week data.
-
toGregorianDate
GregorianDate toGregorianDate(CalendarDate date)
Convert a date time into a date in the Gregorian calendar, with locale-specific week data.
-
toISO8601Date
ISO8601Date toISO8601Date(long epoch, java.lang.String zoneId)
Convert a date time into a date in the ISO-8601 calendar, with ISO week data.
-
toISO8601Date
ISO8601Date toISO8601Date(java.util.Date date, java.lang.String zoneId)
Convert a date time into a date in the ISO-8601 calendar, with ISO week data.
-
toISO8601Date
ISO8601Date toISO8601Date(CalendarDate date)
Convert a date time into a date in the ISO-8601 calendar, with ISO week data.
-
toJapaneseDate
JapaneseDate toJapaneseDate(long epoch, java.lang.String zoneId)
Convert a date time into a date in the Japanese calendar, with locale-specific week data.
-
toJapaneseDate
JapaneseDate toJapaneseDate(java.util.Date date, java.lang.String zoneId)
Convert a date time into a date in the Japanese calendar, with locale-specific week data.
-
toJapaneseDate
JapaneseDate toJapaneseDate(CalendarDate date)
Convert a date time into a date in the Japanese calendar, with locale-specific week data.
-
toPersianDate
PersianDate toPersianDate(long epoch, java.lang.String zoneId)
Convert a date time into a date in the Persian calendar, with locale-specific week data.
-
toPersianDate
PersianDate toPersianDate(java.util.Date date, java.lang.String zoneId)
Convert a date time into a date in the Persian calendar, with locale-specific week data.
-
toPersianDate
PersianDate toPersianDate(CalendarDate date)
Convert a date time into a date in the Persian calendar, with locale-specific week data.
-
formatDateRaw
java.lang.String formatDateRaw(CalendarDate date, DateRawFormatOptions options)
Formats a date-time value to string using a raw date-time pattern. Warning: You should not use this for general formatting.
-
formatDate
java.lang.String formatDate(CalendarDate date, DateFormatOptions options)
Formats a date-time value to string.
-
formatDateToParts
java.util.List<Part> formatDateToParts(CalendarDate date, DateFormatOptions options)
Formats a date-time value to an array of parts.
-
formatDateInterval
java.lang.String formatDateInterval(CalendarDate start, CalendarDate end, DateIntervalFormatOptions options)
Formats a date interval with a start and end.
-
formatDateIntervalToParts
java.util.List<Part> formatDateIntervalToParts(CalendarDate start, CalendarDate end, DateIntervalFormatOptions options)
Formats a date-time interval for the given skeleton to an array of parts.
-
formatRelativeTimeField
java.lang.String formatRelativeTimeField(Decimal value, RelativeTimeFieldType field, RelativeTimeFieldFormatOptions options)
Formats a relative time field to string.
-
formatRelativeTime
java.lang.String formatRelativeTime(CalendarDate start, CalendarDate end, RelativeTimeFormatOptions options)
Formats the relative time from a start to end date.
-
timeData
TimeData timeData()
Return information about the locale's preferred and allowed time cycles.
-
timeZoneIds
java.util.List<java.lang.String> timeZoneIds()
Return an array containing the official TZDB timezone identifiers.
-
resolveTimeZoneId
java.lang.String resolveTimeZoneId(java.lang.String zoneId)
Resolve a timezone id / alias to the official TZDB identifier.
-
timeZoneInfo
TimeZoneInfo timeZoneInfo(java.lang.String zoneId)
Return additional information for a timezone id, including the localized exemplar city.
-
-