Class ThaiSolarCalendar
java.lang.Object
net.okapia.osid.primordium.calendaring.framework.spi.AbstractCalendarInfo
net.okapia.osid.primordium.calendaring.framework.spi.AbstractWesternCalendar
net.okapia.osid.primordium.calendaring.datetime.civil.definitions.ThaiSolarCalendar
- All Implemented Interfaces:
Serializable, CalendarInfo
The Thai solar calendar, the official civil calendar of Thailand: the
Gregorian calendar carrying Buddhist Era (B.E.) year numbers, so a Thai
year Y is AD Y-543 and AD 2026 is B.E. 2569. Siam adopted the Gregorian
month-and-day structure in 1888 and moved the new year to 1 January in
1941; it is a national civil calendar, not an individual's invention.
The twelve months (มกราคม through ธันวาคม) and the seven-day week are
the Gregorian ones in Thai, of 28 to 31 days, leaping by the Gregorian
rule, so a common year is 365 days and a leap year 366. The epoch is the
proleptic 1 January 544 BC (Julian Day 1523098).
Its calendar type is
CalendarTypes.THAI_SOLAR, and
it is paired with UTCTimeDefinition.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the calendar type.Gets the calendar description.Gets the short form of the name of the time from the epoch onward, as AD abbreviates Anno Domini; valid whenCalendarInfo.isEpochNamed().longGets the fixed epoch Julian Day; valid whenCalendarInfo.isEpochFixed().Gets the name of the time from the epoch onward, as Anno Domini names it in the Gregorian calendar; valid whenCalendarInfo.isEpochNamed().getName()Gets the calendar name.Gets the short form of the name of the time before the first day of the calendar, as BC abbreviates Before Christ; valid whenCalendarInfo.isEpochNamed().Gets the name of the time before the first day of the calendar, as Before Christ names it in the Gregorian calendar; valid whenCalendarInfo.isEpochNamed().booleanThe eras are named: the year counts from the passing of the Buddha, and the time before it is that era with the word for "before" ahead of it.Methods inherited from class AbstractWesternCalendar
getCycles, getMainDivision, isEpochFixedModifier and TypeMethodDescriptionGets the free-running cycles (the weekday) that ride alongside the division tree.Gets the main (top) division -- the year.booleanTests whether the epoch is a fixed Julian Day.Methods inherited from class AbstractCalendarInfo
getEpochRule, isDeterministic, isEpochDerivedModifier and TypeMethodDescriptionGets the epoch derivation rule; valid whenCalendarInfo.isEpochDerived().booleanTests whether rollover and leaping are predictable -- the condition for converting this calendar to another.booleanTests whether the epoch is derived from a rule.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CalendarInfo
startsDayAtStartOfClockModifier and TypeMethodDescriptiondefault booleanTests whether this calendar's day begins at the start of the clock -- the zero of the time of day (midnight on a 24-hour clock) -- as opposed to an offset reckoning such as sunset (Hebrew, Islamic) or sunrise.
-
Constructor Details
-
ThaiSolarCalendar
public ThaiSolarCalendar()Creates a newThaiSolarCalendar.
-
-
Method Details
-
getName
Description copied from interface:CalendarInfoGets the calendar name.- Specified by:
getNamein interfaceCalendarInfo- Overrides:
getNamein classAbstractCalendarInfo- Returns:
- the name
-
getDescription
Description copied from interface:CalendarInfoGets the calendar description.- Specified by:
getDescriptionin interfaceCalendarInfo- Overrides:
getDescriptionin classAbstractCalendarInfo- Returns:
- the description
-
getCalendarType
Description copied from interface:CalendarInfoGets the calendar type.- Specified by:
getCalendarTypein interfaceCalendarInfo- Overrides:
getCalendarTypein classAbstractCalendarInfo- Returns:
- the calendar type
-
getEpochAsJulianDay
public long getEpochAsJulianDay()Description copied from interface:CalendarInfoGets the fixed epoch Julian Day; valid whenCalendarInfo.isEpochFixed().- Specified by:
getEpochAsJulianDayin interfaceCalendarInfo- Overrides:
getEpochAsJulianDayin classAbstractCalendarInfo- Returns:
- the epoch Julian Day
-
isEpochNamed
public boolean isEpochNamed()The eras are named: the year counts from the passing of the Buddha, and the time before it is that era with the word for "before" ahead of it. Both shorten as they are written on a Thai document.- Returns:
true
-
getEpochName
Description copied from interface:CalendarInfoGets the name of the time from the epoch onward, as Anno Domini names it in the Gregorian calendar; valid whenCalendarInfo.isEpochNamed().- Returns:
- the name of the era
-
getEpochAbbrev
Description copied from interface:CalendarInfoGets the short form of the name of the time from the epoch onward, as AD abbreviates Anno Domini; valid whenCalendarInfo.isEpochNamed().- Returns:
- the abbreviated name of the era
-
getPreEpochName
Description copied from interface:CalendarInfoGets the name of the time before the first day of the calendar, as Before Christ names it in the Gregorian calendar; valid whenCalendarInfo.isEpochNamed().- Returns:
- the name of the era before the epoch
-
getPreEpochAbbrev
Description copied from interface:CalendarInfoGets the short form of the name of the time before the first day of the calendar, as BC abbreviates Before Christ; valid whenCalendarInfo.isEpochNamed().- Returns:
- the abbreviated name of the era before the epoch
-