Class JulianAnnunciationMeanSolarDateTime
java.lang.Object
net.okapia.osid.primordium.calendaring.datetime.spi.AbstractDateTime
net.okapia.osid.primordium.calendaring.datetime.spi.AbstractConfigurableDateTime
net.okapia.osid.primordium.calendaring.datetime.historical.JulianAnnunciationMeanSolarDateTime
- All Implemented Interfaces:
Serializable, Comparable<DateTime>, DateTime, OsidPrimitive, DateTime, OsidPrimitive
public final class JulianAnnunciationMeanSolarDateTime
extends AbstractConfigurableDateTime
implements DateTime
A Julian date reckoned in the Annunciation (Lady Day) style with a
mean solar time of day.
The date and time behave exactly as JulianMeanSolarDateTime; the only difference is that the year turns
on March 25, so a date from January 1 to March 24 prints a dual year
("1502/3"). The value is stored in ordinary proleptic-Julian
(January-1) numbering, so the component factories take the January-1
year (1503 for a February date written 1502/3); the dual form is the
display and the valueOf(String) input.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe factory used to constructJulianAnnunciationMeanSolarDateTimes.static classThe specifier used to constructJulianAnnunciationMeanSolarDateTimes. -
Field Summary
FieldsFields inherited from class AbstractConfigurableDateTime
GREGORIAN_REFORM, YEARS_PER_BLUEMOONModifier and TypeFieldDescriptionprotected static final Instantthe gregorian reformstatic final BigDecimalthe years per bluemoon -
Constructor Summary
ConstructorsConstructorDescriptionJulianAnnunciationMeanSolarDateTime(JulianAnnunciationMeanSolarDateTime.JulianAnnunciationMeanSolarDateTimeSpecifier specifier) Constructs a newJulianAnnunciationMeanSolarDateTime. -
Method Summary
Modifier and TypeMethodDescriptionstatic DateTimedatetime(long year) Creates a DateTime at year resolution.static DateTimedatetime(long year, long month) Creates a DateTime at month resolution.static DateTimedatetime(long year, long month, long day) Creates a DateTime at day resolution.static DateTimeCreates a DateTime at a date and time.static DateTimeParses a date string.static DateTimeinfinity()Gets an infinite date.static DateTimeunknown()Gets an unknown date.static DateTimevalueOf(long year) Creates a DateTime at year resolution.static DateTimevalueOf(long year, long month) Creates a DateTime at month resolution.static DateTimevalueOf(long year, long month, long day) Creates a DateTime at day resolution.static DateTimeCreates a DateTime at a date and time.static DateTimeParses a date string, accepting the Annunciation dual year ("1502/3-02-10").Methods inherited from class AbstractConfigurableDateTime
compare, compareTo, denormalize, equals, formatDigits, formatNumber, formatYear, fromComponents, fromInstant, fromLocalDateTime, fromOffsetDateTime, fromZonedDateTime, getDateTimeFactory, getTime, getWeek, hashCode, isExclusive, isGreater, isInclusive, isLess, minus, minus, parse, parseISO, plus, plus, requireResolution, toLocaleDateString, toLocaleTimeString, toShortLocaleDateString, toString, toTime, toTimeStringModifier and TypeMethodDescriptionprotected static intcompare(DateTime dt1, DateTime dt2, DateTimeFactory factory) Compares two normalized finite datetimes.intCompares this DateTime with the specified DateTime for ordering.final DateTimeIntervalReturns an interval based on this DateTime derived by its granularity and uncertainty.final booleanDetermines if the givenTimeis equal to this one.protected static StringformatDigits(long num, int n) Formats a number, zero-padded to a minimum number of digits.protected static StringformatNumber(long num) Formats a number as an ordinal (1st, 2nd, 3rd, ...).protected static StringformatYear(long year) Formats a year for display, zero-padded to four digits within the common range.protected static DateTimefromComponents(DateTimeFactory factory, long year, long month, long day, Time time) Builds a DateTime from explicit calendar components.protected static DateTimefromInstant(DateTimeFactory factory, Instant instant, DateTimeResolution granularity) Converts a JavaInstantto a DateTime.protected static DateTimefromLocalDateTime(DateTimeFactory factory, LocalDateTime ldt, DateTimeResolution granularity) Converts a JavaLocalDateTimeto a DateTime, treating the value as already in UTC.protected static DateTimefromOffsetDateTime(DateTimeFactory factory, OffsetDateTime odt, DateTimeResolution granularity) Converts a JavaOffsetDateTimeto a DateTime, adjusting to UTC.protected static DateTimefromZonedDateTime(DateTimeFactory factory, ZonedDateTime zdt, DateTimeResolution granularity) Converts a JavaZonedDateTimeto a DateTime, adjusting to UTC.protected DateTimeFactoryGets the datetime factory.protected TimegetTime()Gets the time component.final longgetWeek()Gets the week of the year, counting from one.final inthashCode()Returns a hash code value for thisTimebased on the type, granularity and values.final booleanisExclusive(DateTime datetime) Tests if the range of this DateTime, as specified by its granularity and uncertainty, does not overlap with the given DateTime.booleanTests if this DateTime is greater than the given DateTime.final booleanisInclusive(DateTime datetime) Tests if the range of this DateTime, as specified by its granularity and uncertainty, includes the given DateTime ranged by its grabularity and uncertainty.final booleanTests if this DateTime is less than the given DateTime.minus(long amount, DateTimeResolution unit) Subtracts a number of a resolution's units from this datetime.Subtracts a duration from this datetime.protected static DateTimeparse(DateTimeFactory factory, String string) Parses the okapia-extended datetime form: a strict ISO datetime optionally trailed by an uncertainty (" ±n unit" / " +p -m unit", with an optional "exclusive"), or the standalone "?" (unknown) and "infinity".protected static DateTimeparseISO(DateTimeFactory factory, String iso) Parses an ISO date string.plus(long amount, DateTimeResolution unit) Adds a number of a resolution's units to this datetime, in its own calendar.Adds a duration to this datetime, applying its calendar components (years, months, weeks, days) and clock components (hours, minutes, seconds) in this datetime's own calendar.protected static voidrequireResolution(DateTimeResolution granularity, DateTimeResolution floor, String source) Verifies that a requested resolution is no finer than the source's own precision, so a conversion does not fabricate digits the source cannot supply -- e.g.Renders the date in a long locale form using the calendar's own month names -- the Gregorian form, for example, is "January 31, 2020", and at month granularity "January 2020".Renders the time in a locale form.Renders the date in a short locale form, abbreviating the month name -- the Gregorian form is "31 Jan 2020", and at month granularity "Jan 2020".toString()Returns a string representation of this DateTime.toTime()Gets the time of day as aTime.Renders the time of day, or the empty string when this datetime has no time component (a granularity of a day or coarser).Methods inherited from class AbstractDateTime
coarsePeriodYears, definesUncertainty, getAeon, getAttoseconds, getCalendarType, getCentury, getDay, getEpoch, getFemtoseconds, getGranularity, getGranularityMultiplier, getHour, getMicroquectoseconds, getMicroseconds, getMillennium, getMilliquectoseconds, getMilliseconds, getMinute, getMonth, getNanoseconds, getPicoseconds, getPlanckseconds, getQuectoseconds, getRontoseconds, getSecond, getTimeType, getUncertaintyMinus, getUncertaintyPlus, getUncertaintyUnits, getYear, getYoctoseconds, getZeptoseconds, isUncertaintyDateInclusive, rawDay, referenceYearModifier and TypeMethodDescriptionprotected long[]Gets the first and last year of this value's coarse period.final booleanTests if uncertainty is defined for this time.final longgetAeon()Gets the aeon.final longGets the number of attoseconds of the femtoseconds 0-999.final TypeGets the calendar type.final longGets the century.final longgetDay()Gets the day of the month.final longgetEpoch()Gets the epoch.final longGets the number of femtoseconds of the picosecond 0-999.final DateTimeResolutionGets the granularity of this time.final longIf the granularity of the time equalsgetGranularity(),then the multiplier is 1.final longgetHour()Gets the hour of the day.final longGets the number of undaseconds of the vatosecond 0-999.final longGets the number of microseconds of the second 0-999.final longGets the millennium.final longGets the number of vatoseconds of the xoxxosecond 0-999.final longGets the number of milliseconds in this second 0-999.final longGets the minute of the hour.final longgetMonth()Gets the month.final longGets the number of nanoseconds of the microsecond 0-999.final longGets the number of picoseconds of the nanosecond 0-999.final longGets the number of Plancks of the vatoseconds.final longGets the number of weebleseconds of the xoxxosecond 0-999.final longGets the number of xoxxoseconds of the yoctosecond 0-999.final longGets the second of the minute.final TypeGets the time type.final longGets the uncertainty of this time in the negative direction.final longGets the uncertainty of this time in the positive direction.final DateTimeResolutionGets the units of the uncertainty.final longgetYear()Gets the year.final longGets the number of yoctoseconds of the picosecond 0-999.final longGets the number of zeptoseconds of the attosecond 0-999.booleanTests if the uncertainty is inclusive of all dates.protected final longrawDay()Gets the stored day of the month, ungated by granularity.protected longGets a year within this value's period, from which the coarser fields are derived.
-
Field Details
-
CALENDAR_TYPE
the OSID Type
-
-
Constructor Details
-
JulianAnnunciationMeanSolarDateTime
public JulianAnnunciationMeanSolarDateTime(JulianAnnunciationMeanSolarDateTime.JulianAnnunciationMeanSolarDateTimeSpecifier specifier) Constructs a newJulianAnnunciationMeanSolarDateTime.- Parameters:
specifier- a datetime specifier- Throws:
NullArgumentException-specifierisnull
-
-
Method Details
-
valueOf
Parses a date string, accepting the Annunciation dual year ("1502/3-02-10").- Parameters:
iso- the formatted string- Returns:
- a Julian (Annunciation) / mean-solar DateTime
- Throws:
InvalidArgumentException- could not parseisoNullArgumentException-isoisnull- See Also:
-
datetime
Parses a date string. Equivalent tovalueOf(String).- Parameters:
iso- the formatted string- Returns:
- a Julian (Annunciation) / mean-solar DateTime
- Throws:
InvalidArgumentException- could not parseisoNullArgumentException-isoisnull- See Also:
-
valueOf
Creates a DateTime at year resolution.- Parameters:
year- the January-1 year (there is no year zero)- Returns:
- a Julian (Annunciation) / mean-solar DateTime
- Throws:
InvalidArgumentException-yearis zero- See Also:
-
datetime
Creates a DateTime at year resolution.- Parameters:
year- the January-1 year (there is no year zero)- Returns:
- a Julian (Annunciation) / mean-solar DateTime
- Throws:
InvalidArgumentException-yearis zero- See Also:
-
valueOf
Creates a DateTime at month resolution.- Parameters:
year- the January-1 year (there is no year zero)month- the month, from 1- Returns:
- a Julian (Annunciation) / mean-solar DateTime
- Throws:
InvalidArgumentException- a component is out of range- See Also:
-
datetime
Creates a DateTime at month resolution.- Parameters:
year- the January-1 year (there is no year zero)month- the month, from 1- Returns:
- a Julian (Annunciation) / mean-solar DateTime
- Throws:
InvalidArgumentException- a component is out of range- See Also:
-
valueOf
Creates a DateTime at day resolution.- Parameters:
year- the January-1 year (there is no year zero)month- the month, from 1day- the day, from 1- Returns:
- a Julian (Annunciation) / mean-solar DateTime
- Throws:
InvalidArgumentException- a component is out of range- See Also:
-
datetime
Creates a DateTime at day resolution.- Parameters:
year- the January-1 year (there is no year zero)month- the month, from 1day- the day, from 1- Returns:
- a Julian (Annunciation) / mean-solar DateTime
- Throws:
InvalidArgumentException- a component is out of range- See Also:
-
valueOf
Creates a DateTime at a date and time. The time's resolution sets the datetime's resolution.- Parameters:
year- the January-1 year (there is no year zero)month- the month, from 1day- the day, from 1time- the time of day (a mean solar time)- Returns:
- a Julian (Annunciation) / mean-solar DateTime
- Throws:
InvalidArgumentException- a component is out of rangeUnsupportedException-timeis not a mean solar timeNullArgumentException-timeisnull- See Also:
-
datetime
Creates a DateTime at a date and time. The time's resolution sets the datetime's resolution.- Parameters:
year- the January-1 year (there is no year zero)month- the month, from 1day- the day, from 1time- the time of day (a mean solar time)- Returns:
- a Julian (Annunciation) / mean-solar DateTime
- Throws:
InvalidArgumentException- a component is out of rangeUnsupportedException-timeis not a mean solar timeNullArgumentException-timeisnull- See Also:
-
infinity
-
unknown
-