Package de.galan.commons.time
Class Instants.InstantBuilder
- java.lang.Object
-
- de.galan.commons.time.Instants.InstantBuilder
-
-
Constructor Summary
Constructors Constructor Description InstantBuilder(Instant instant)
-
Method Summary
-
-
-
Constructor Detail
-
InstantBuilder
public InstantBuilder(Instant instant)
-
-
Method Detail
-
zone
public Instants.InstantBuilder zone(ZoneId zoneId)
-
with
public Instants.InstantBuilder with(TemporalAdjuster adjuster)
-
in
public Instants.InstantBuilder in(int amount, Instants.DatetimeUnit unit)
-
before
public Instants.InstantBuilder before(int amount, Instants.DatetimeUnit unit)
-
next
public Instants.InstantBuilder next(Instants.DatetimeUnit unit)
-
previous
public Instants.InstantBuilder previous(Instants.DatetimeUnit unit)
-
truncate
public Instants.InstantBuilder truncate(Instants.DatetimeUnit unit)
Truncates the time using the defined timezone
-
next
public Instants.InstantBuilder next(Instants.WeekdayUnit unit)
-
previous
public Instants.InstantBuilder previous(Instants.WeekdayUnit unit)
-
at
public Instants.InstantBuilder at(int hour, int minute, int second)
-
at
public Instants.InstantBuilder at(String time)
Splits a time in the form hh:MM:ss
-
atMidnight
public Instants.InstantBuilder atMidnight()
-
atNoon
public Instants.InstantBuilder atNoon()
-
till
public long till(Date date)
-
till
public long till(Instant instant)
-
toString
public String toString()
Returns same as toStringLocal()
-
toStringLocal
public String toStringLocal()
Returns the time in local timezone and format
-
toStringLocalMillis
public String toStringLocalMillis()
-
toStringLocalNanos
public String toStringLocalNanos()
-
toStringUtcMillis
public String toStringUtcMillis()
-
toStringUtcNano
public String toStringUtcNano()
-
toStringUtc
public String toStringUtc()
-
toLong
public long toLong()
-
toInstant
public Instant toInstant()
-
toDate
public Date toDate()
-
toZdt
public ZonedDateTime toZdt()
Returns the instant as ZonedDateTime with UTC as ZoneId
-
toZdt
public ZonedDateTime toZdt(ZoneId zoneId)
-
-