public class LocalTime
extends Object
GDK enhancements for LocalTime.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public String |
format(String pattern)Formats this time with the provided DateTimeFormatter pattern. |
|
public String |
format(FormatStyle timeStyle)Formats this time in the provided, localized FormatStyle. |
|
public String |
getTimeString()Formats this time with the DateTimeFormatter.ISO_LOCAL_TIME formatter. |
|
public LocalDateTime |
leftShift(LocalDate date)Returns a LocalDateTime of this time and the provided LocalDate. |
|
public OffsetTime |
leftShift(ZoneOffset offset)Returns an OffsetTime of this time and the provided ZoneOffset. |
|
public LocalTime |
minus(long seconds)Returns a LocalTime that is seconds seconds before this time. |
|
public LocalTime |
next()Returns a LocalTime that is one second after this time. |
|
public static LocalTime |
parse(LocalTime type, CharSequence text, String pattern)Parse text into a LocalTime using the provided pattern. |
|
public LocalTime |
plus(long seconds)Returns a LocalTime that is seconds seconds after this time. |
|
public LocalTime |
previous()Returns a LocalTime that is one second before this time. |
|
public Calendar |
toCalendar()Returns a generally equivalent instance of Calendar. |
|
public Date |
toDate()Returns a generally equivalent instance of Date. |
| Methods inherited from class | Name |
|---|---|
class Object |
addShutdownHook, any, any, asBoolean, asType, collect, collect, collect, dump, each, eachMatch, eachMatch, eachWithIndex, every, every, find, find, findAll, findAll, findIndexOf, findIndexOf, findIndexValues, findIndexValues, findLastIndexOf, findLastIndexOf, findResult, findResult, findResult, findResult, getAt, getMetaClass, getMetaPropertyValues, getProperties, grep, grep, hasProperty, identity, inject, inject, inspect, invokeMethod, is, isCase, isNotCase, iterator, metaClass, print, print, printf, printf, println, println, println, putAt, respondsTo, respondsTo, setMetaClass, sleep, sleep, split, sprintf, sprintf, stream, tap, toString, use, use, use, with, with, withCloseable, withCloseable, withMethodClosure, withStream, withStream, withTraits |
Formats this time with the provided DateTimeFormatter pattern.
pattern - the formatting patternFormats this time in the provided, localized FormatStyle.
timeStyle - the FormatStyleFormats this time with the DateTimeFormatter.ISO_LOCAL_TIME formatter.
Returns a LocalDateTime of this time and the provided LocalDate.
date - a LocalDateReturns an OffsetTime of this time and the provided ZoneOffset.
offset - a ZoneOffset Returns a LocalTime that is seconds seconds before this time.
seconds - the number of seconds to subtractReturns a LocalTime that is one second after this time.
Parse text into a LocalTime using the provided pattern.
type - placeholder variable used by Groovy categories; ignored for default static methodstext - String to be parsed to create the date instancepattern - pattern used to parse the text Returns a LocalTime that is seconds seconds after this time.
seconds - the number of seconds to addReturns a LocalTime that is one second before this time.
Returns a generally equivalent instance of Calendar. The day-month-year value of the returned calendar is today, the time is truncated to milliseconds, and the time zone is the current system default.