@CalendarType(value="hebrew") public final class HebrewTime extends TimePoint<HebrewTime.Unit,HebrewTime> implements Temporal<HebrewTime>
Represents the 12-hour-time used in Jewish calendar starting in the evening at either sunset or simplified at 6 PM as zero point.
The calendar day is divided into day and night, or more precisely into two periods from sunset to sunrise and then to next sunset. Each period is again divided into 12 timely hours which have no fixed length due to seasonal changes. And each such hour is divided into 1080 parts (halakim). See also: www.torahcalendar.com.

A suitable formatter can be constructed by help of dynamic format patterns, but not by the standard format pattern CLDR:
HebrewTime htime = HebrewTime.ofNight(12, 540);
ChronoFormatter<HebrewTime> f =
ChronoFormatter.ofPattern("H'H' P'P'", PatternType.DYNAMIC, Locale.ROOT, HebrewTime.axis());
assertThat(f.format(htime), is("0H 540P"));
HebrewCalendar,
PatternType.DYNAMIC,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static class |
HebrewTime.ClockCycle
Defines the day-night-cycle associated with sunset and sunrise.
|
static class |
HebrewTime.Unit
Defines the time units for the Hebrew time.
|
| Modifier and Type | Field and Description |
|---|---|
static ChronoElement<HebrewTime.ClockCycle> |
CLOCK_CYCLE
Marks the period between either sunset and sunrise (NIGHT) or sunrise and sunset (DAY).
|
static StdCalendarElement<Integer,HebrewTime> |
CLOCK_HOUR
The Hebrew hour with the biblical value range 1-12 which is coupled to the sun cycle.
|
static StdCalendarElement<Integer,HebrewTime> |
DIGITAL_HOUR
The Hebrew hour with the digital value range 0-23 which is coupled to the sun cycle.
|
static StdCalendarElement<Integer,HebrewTime> |
PART_OF_HOUR
Marks the part of hour (helek) with the value range 0-1079.
|
| Modifier and Type | Method and Description |
|---|---|
static ChronoFunction<Moment,Optional<HebrewTime>> |
at(SolarTime geoLocation)
Obtains the Hebrew time dependent on given moment and location related to solar time.
|
static ChronoFunction<Moment,HebrewTime> |
at(TZID tzid)
Obtains the simplified Hebrew time dependent on given moment and a 24-hour-fixed scale.
|
static TimeAxis<HebrewTime.Unit,HebrewTime> |
axis()
Provides a static access to the associated time axis respective
chronology which contains the chronological rules.
|
int |
compareTo(HebrewTime other)
Compares two time points preferably by their temporal positions
on the common time axis.
|
boolean |
equals(Object obj)
Compares the whole state of this instance with given object.
|
int |
getClockHour()
Yields the Hebrew hour in the biblical range 1-12.
|
int |
getDigitalHour()
Yields the Hebrew hour in the digital value range 0-23.
|
int |
getPart()
Yields the part of hour (helek).
|
int |
hashCode()
Subclasses must redefine this method corresponding to the
behaviour of
equals(). |
boolean |
isAfter(HebrewTime other)
Queries if this object is after given object on a timeline.
|
boolean |
isBefore(HebrewTime other)
Queries if this object is before given object on a timeline.
|
boolean |
isDay()
Is this time during day when the sun is above the horizon?
|
boolean |
isNight()
Is this time during night when the sun is below the horizon?
|
boolean |
isSimultaneous(HebrewTime other)
Queries if this object and given object have the same position
on the time axis.
|
static Optional<HebrewTime> |
now(SolarTime geoLocation)
Obtains the current Hebrew time in system time and at given geographical position.
|
static HebrewTime |
nowInSystemTime()
Obtains the current simplified Hebrew time in system time on a fixed 24-hour-scale.
|
static HebrewTime |
ofDay(int hour12,
int part)
Obtains an instance of Hebrew time between sunrise and sunset (day).
|
static HebrewTime |
ofDigital(int hour23,
int part)
Obtains an instance of Hebrew time between two sunsets.
|
static HebrewTime |
ofNight(int hour12,
int part)
Obtains an instance of Hebrew time between sunset and sunrise (night).
|
Optional<Moment> |
on(HebrewCalendar date,
SolarTime geoLocation)
Obtains the moment at this Hebrew time on given date at the given geographical position.
|
Moment |
on(HebrewCalendar date,
Timezone tz)
Obtains the moment at this simplified Hebrew time on given date using a fixed 24-hour-scale.
|
String |
toString()
Provides a complete textual representation of the state of
this time point.
|
max, min, minus, minus, plus, plus, until, untilcontains, get, get, getInt, getMaximum, getMinimum, getRegisteredElements, getTimezone, hasTimezone, isValid, isValid, isValid, matches, with, with, with, withisAfterAll, isAfterOrEqual, isBeforeAll, isBeforeOrEqualpublic static final ChronoElement<HebrewTime.ClockCycle> CLOCK_CYCLE
@FormattableElement(format="h") public static final StdCalendarElement<Integer,HebrewTime> CLOCK_HOUR
@FormattableElement(format="H") public static final StdCalendarElement<Integer,HebrewTime> DIGITAL_HOUR
@FormattableElement(format="P", dynamic=true) public static final StdCalendarElement<Integer,HebrewTime> PART_OF_HOUR
Note: This element is not covered by ISO-8601 or CLDR standard but represents an enhancement.
public static HebrewTime ofDigital(int hour23, int part)
Obtains an instance of Hebrew time between two sunsets.
hour23 - hebrew hour in the digital range 0-23part - the part of hour (helek) in range 0-1079public static HebrewTime ofNight(int hour12, int part)
Obtains an instance of Hebrew time between sunset and sunrise (night).
hour12 - hebrew hour in the biblical range 1-12 during nightpart - the part of hour (helek) in range 0-1079public static HebrewTime ofDay(int hour12, int part)
Obtains an instance of Hebrew time between sunrise and sunset (day).
hour12 - hebrew hour in the biblical range 1-12 during daypart - the part of hour (helek) in range 0-1079public static Optional<HebrewTime> now(SolarTime geoLocation)
Obtains the current Hebrew time in system time and at given geographical position.
geoLocation - the geographical position as basis of the solar timeSystemClock.currentMoment(),
at(SolarTime)public static HebrewTime nowInSystemTime()
Obtains the current simplified Hebrew time in system time on a fixed 24-hour-scale.
Convenient short-cut for: SystemClock.inLocalView().now(HebrewTime.axis()).
SystemClock.inLocalView(),
ZonalClock.now(Chronology),
now(SolarTime),
at(TZID),
on(HebrewCalendar, Timezone)public static ChronoFunction<Moment,Optional<HebrewTime>> at(SolarTime geoLocation)
Obtains the Hebrew time dependent on given moment and location related to solar time.
The length of hours varies with the geographical position and the seasonal drift of length of day. Furthermore, the Hebrew time cannot be determined in circumpolar regions when the sun never rises or sets.
geoLocation - the geographical position as basis of the solar timenow(SolarTime),
on(HebrewCalendar, SolarTime)public static ChronoFunction<Moment,HebrewTime> at(TZID tzid)
Obtains the simplified Hebrew time dependent on given moment and a 24-hour-fixed scale.
The simplified Hebrew time always starts on 6 pm in the evening. A more exact conversion
can be obtained by at(SolarTime).
tzid - timezone identifiernowInSystemTime(),
on(HebrewCalendar, Timezone)public boolean isNight()
Is this time during night when the sun is below the horizon?
public boolean isDay()
Is this time during day when the sun is above the horizon?
public int getClockHour()
Yields the Hebrew hour in the biblical range 1-12.
public int getDigitalHour()
Yields the Hebrew hour in the digital value range 0-23.
public int getPart()
Yields the part of hour (helek).
public boolean isAfter(HebrewTime other)
TemporalQueries if this object is after given object on a timeline.
isAfter in interface Temporal<HebrewTime>other - object this instance is compared totrue if this instance is temporally after
temporal else falsepublic boolean isBefore(HebrewTime other)
TemporalQueries if this object is before given object on a timeline.
isBefore in interface Temporal<HebrewTime>other - object this instance is compared totrue if this instance is temporally before
temporal else falsepublic boolean isSimultaneous(HebrewTime other)
TemporalQueries if this object and given object have the same position on the time axis.
Is equivalent to !isAfter(temporal) && !isBefore(temporal).
This method differs from the Object-method equals()
such that first the comparison type must be a temporal one and second
that only temporal-only state will be considered.
isSimultaneous in interface Temporal<HebrewTime>other - object this instance is compared totrue if this instance is temporally equal
to temporal else falsepublic int compareTo(HebrewTime other)
TimePointCompares two time points preferably by their temporal positions on the common time axis.
Implementation note: In order to make the natural order consistent
with equals() the whole state must be taken into account,
with preference for those attributes which define the temporal
position on the time axis.
compareTo in interface Comparable<HebrewTime>compareTo in class TimePoint<HebrewTime.Unit,HebrewTime>TimePoint.equals(Object)public boolean equals(Object obj)
TimePointCompares the whole state of this instance with given object.
Implementations will usually define their state only based on the temporal position on the time axis because this is the most intuitive approach. Exceptions from this rule should be explicitly documented and reasoned.
equals in class TimePoint<HebrewTime.Unit,HebrewTime>TimePoint.compareTo(TimePoint)public int hashCode()
TimePointSubclasses must redefine this method corresponding to the
behaviour of equals().
hashCode in class TimePoint<HebrewTime.Unit,HebrewTime>public String toString()
TimePointProvides a complete textual representation of the state of this time point.
The textual description often follows the conventions of ISO-8601. Usually the description starts with the chronological informations which are coarse-grained and ends with those ones which are fine-grained (for example the ISO-notation YYYY-MM-DD).
toString in class TimePoint<HebrewTime.Unit,HebrewTime>public Optional<Moment> on(HebrewCalendar date, SolarTime geoLocation)
Obtains the moment at this Hebrew time on given date at the given geographical position.
Note: The practical precision of this method is constrained to minutes.
date - the Hebrew date to be combined with this timegeoLocation - the geographical position as basis of the solar timenow(SolarTime),
at(SolarTime)public Moment on(HebrewCalendar date, Timezone tz)
Obtains the moment at this simplified Hebrew time on given date using a fixed 24-hour-scale.
The simplified Hebrew time always starts on 6 pm in the evening. A more exact conversion
can be obtained by on(HebrewCalendar, SolarTime). Attention: This method might have
very small rounding errors in nanosecond range because halakim cannot always be converted
to seconds in an exact way.
date - the Hebrew date to be combined with this timetz - timezonenowInSystemTime(),
at(TZID)public static TimeAxis<HebrewTime.Unit,HebrewTime> axis()
Provides a static access to the associated time axis respective chronology which contains the chronological rules.
null)Copyright © 2014–2021. All rights reserved.