java_time_utils.javatime
Modules
java_time_utils.javatime
Module java_time_utils.javatime
API
Declarations
Definitions
kruutteri1/java_time_utils.javatime
Functions
getMAX
function getMAX() returns LocalTimeRetrieves the value of the public field MAX.
Return Type
- LocalTime - The
LocalTimevalue of the field.
getMIDNIGHT
function getMIDNIGHT() returns LocalTimeRetrieves the value of the public field MIDNIGHT.
Return Type
- LocalTime - The
LocalTimevalue of the field.
getMin
function getMin() returns LocalTimeRetrieves the value of the public field MIN.
Return Type
- LocalTime - The
LocalTimevalue of the field.
getNOON
function getNOON() returns LocalTimeRetrieves the value of the public field NOON.
Return Type
- LocalTime - The
LocalTimevalue của the field.
LocalDate_getEPOCH
function LocalDate_getEPOCH() returns LocalDateReturns the epoch date (1970-01-01).
Return Type
- LocalDate - The EPOCH constant.
LocalDate_getMAX
function LocalDate_getMAX() returns LocalDateReturns the maximum supported LocalDate (year 999999999-12-31).
Return Type
- LocalDate - The MAX constant.
LocalDate_getMIN
function LocalDate_getMIN() returns LocalDateReturns the minimum supported LocalDate (year -999999999-01-01).
Return Type
- LocalDate - The MIN constant.
LocalDate_now
function LocalDate_now() returns LocalDateObtains the current date from the system clock in the default time-zone.
Return Type
- LocalDate - The current LocalDate.
LocalDate_of
Obtains a LocalDate from a year, month, and day.
Parameters
- year int - The year.
- month int - The month-of-year (1-12).
- day int - The day-of-month (1-31).
Return Type
- LocalDate - The LocalDate.
LocalDate_ofEpochDay
Obtains a LocalDate from the epoch day count.
Parameters
- epochDay int - The number of days from the epoch of 1970-01-01.
Return Type
- LocalDate - The LocalDate.
LocalDate_ofYearDay
Obtains a LocalDate from a year and day-of-year.
Return Type
- LocalDate - The LocalDate.
LocalDateTime_getMAX
function LocalDateTime_getMAX() returns LocalDateTimeRetrieves the maximum supported LocalDateTime (+999999999-12-31T23:59:59.999999999).
Return Type
- LocalDateTime - The maximum LocalDateTime.
LocalDateTime_getMIN
function LocalDateTime_getMIN() returns LocalDateTimeRetrieves the minimum supported LocalDateTime (-999999999-01-01T00:00:00).
Return Type
- LocalDateTime - The minimum LocalDateTime.
LocalDateTime_now
function LocalDateTime_now() returns LocalDateTimeObtains the current date-time from the system clock in the default time-zone.
Return Type
- LocalDateTime - The current LocalDateTime.
LocalDateTime_of
function LocalDateTime_of(int year, int month, int dayOfMonth, int hour, int minute) returns LocalDateTimeObtains an instance of LocalDateTime from year, month, day, hour, and minute.
Parameters
- year int - The year to represent.
- month int - The month-of-year to represent (1-12).
- dayOfMonth int - The day-of-month to represent (1-31).
- hour int - The hour-of-day to represent (0-23).
- minute int - The minute-of-hour to represent (0-59).
Return Type
- LocalDateTime - The LocalDateTime.
LocalDateTime_ofFull
function LocalDateTime_ofFull(int year, int month, int dayOfMonth, int hour, int minute, int second) returns LocalDateTimeObtains an instance of LocalDateTime from year, month, day, hour, minute, and second.
Parameters
- year int - The year to represent.
- month int - The month-of-year to represent (1-12).
- dayOfMonth int - The day-of-month to represent (1-31).
- hour int - The hour-of-day to represent (0-23).
- minute int - The minute-of-hour to represent (0-59).
- second int - The second-of-minute to represent (0-59).
Return Type
- LocalDateTime - The LocalDateTime.
LocalDateTime_ofFullWithNano
function LocalDateTime_ofFullWithNano(int year, int month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond) returns LocalDateTimeObtains an instance of LocalDateTime from year, month, day, hour, minute, second, and nanosecond.
Parameters
- year int - The year to represent.
- month int - The month-of-year to represent (1-12).
- dayOfMonth int - The day-of-month to represent (1-31).
- hour int - The hour-of-day to represent (0-23).
- minute int - The minute-of-hour to represent (0-59).
- second int - The second-of-minute to represent (0-59).
- nanoOfSecond int - The nano-of-second to represent (0-999,999,999).
Return Type
- LocalDateTime - The LocalDateTime.
LocalDateTime_ofLocalDateWithLocalTime
function LocalDateTime_ofLocalDateWithLocalTime(LocalDate date, LocalTime time) returns LocalDateTimeObtains an instance of LocalDateTime from a LocalDate and LocalTime.
Return Type
- LocalDateTime - The LocalDateTime.
LocalTime_now
function LocalTime_now() returns LocalTimeObtains the current time from the system clock in the default time-zone.
Return Type
- LocalTime - The current time.
newObject1
function newObject1() returns ObjectThe constructor function to generate an object of java.lang.Object.
Return Type
- Object - The new
Objectclass generated.
ofHourMinute
Obtains an instance of LocalTime from an hour and minute.
Return Type
- LocalTime - The LocalTime.
ofHourMinuteSecond
Obtains an instance of LocalTime from an hour, minute and second.
Parameters
- hour int - The hour-of-day to represent.
- minute int - The minute-of-hour to represent.
- second int - The second-of-minute to represent.
Return Type
- LocalTime - The LocalTime.
ofHourMinuteSecondNano
function ofHourMinuteSecondNano(int hour, int minute, int second, int nanoOfSecond) returns LocalTimeObtains an instance of LocalTime from an hour, minute, second and nanosecond.
Parameters
- hour int - The hour-of-day.
- minute int - The minute-of-hour.
- second int - The second-of-minute.
- nanoOfSecond int - The nano-of-second.
Return Type
- LocalTime - The LocalTime.
ofNanoOfDay
Obtains an instance of LocalTime from a nanos-of-day value.
Parameters
- nanoOfDay int - The nanos of day.
Return Type
- LocalTime - The LocalTime.
ofSecondOfDay
Obtains an instance of LocalTime from a second-of-day value.
Parameters
- secondOfDay int - The second of day.
Return Type
- LocalTime - The LocalTime.
Classes
java_time_utils.javatime: CharSequence
Ballerina class mapping for the Java java.lang.CharSequence interface.
Constructor
The init function of the Ballerina class mapping the java.lang.CharSequence Java interface.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.lang.CharSequence Java interface.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.lang.CharSequenceobject.
java_time_utils.javatime: ChronoLocalDate
Ballerina class mapping for the Java java.time.chrono.ChronoLocalDate interface.
Constructor
The init function of the Ballerina class mapping the java.time.chrono.ChronoLocalDate Java interface.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.chrono.ChronoLocalDate Java interface.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.chrono.ChronoLocalDateobject.
java_time_utils.javatime: ChronoLocalDateTime
Ballerina class mapping for the Java java.time.chrono.ChronoLocalDateTime interface.
Constructor
The init function of the Ballerina class mapping the java.time.chrono.ChronoLocalDateTime Java interface.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.chrono.ChronoLocalDateTime Java interface.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.chrono.ChronoLocalDateTimeobject.
java_time_utils.javatime: Chronology
Ballerina class mapping for the Java java.time.chrono.Chronology interface.
Constructor
The init function of the Ballerina class mapping the java.time.chrono.Chronology Java interface.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.chrono.Chronology Java interface.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.chrono.Chronologyobject.
java_time_utils.javatime: Class
Ballerina class mapping for the Java java.lang.Class class.
Constructor
The init function of the Ballerina class mapping the java.lang.Class Java class.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.lang.Class Java class.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.lang.Classobject.
java_time_utils.javatime: Clock
Ballerina class mapping for the Java java.time.Clock class.
Constructor
The init function of the Ballerina class mapping the java.time.Clock Java class.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.Clock Java class.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.Clockobject.
java_time_utils.javatime: DateTimeFormatter
Ballerina class mapping for the Java java.time.format.DateTimeFormatter class.
Constructor
The init function of the Ballerina class mapping the java.time.format.DateTimeFormatter Java class.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.format.DateTimeFormatter Java class.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.format.DateTimeFormatterobject.
java_time_utils.javatime: DayOfWeek
Ballerina class mapping for the Java java.time.DayOfWeek class.
Constructor
The init function of the Ballerina class mapping the java.time.DayOfWeek Java class.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.DayOfWeek Java class.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.DayOfWeekobject.
java_time_utils.javatime: Instant
Ballerina class mapping for the Java java.time.Instant class.
Constructor
The init function of the Ballerina class mapping the java.time.Instant Java class.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.Instant Java class.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.Instantobject.
java_time_utils.javatime: IsoChronology
Ballerina class mapping for the Java java.time.chrono.IsoChronology class.
Constructor
The init function of the Ballerina class mapping the java.time.chrono.IsoChronology Java class.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.chrono.IsoChronology Java class.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.chrono.IsoChronologyobject.
java_time_utils.javatime: IsoEra
Ballerina class mapping for the Java java.time.chrono.IsoEra class.
Constructor
The init function of the Ballerina class mapping the java.time.chrono.IsoEra Java class.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.chrono.IsoEra Java class.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.chrono.IsoEraobject.
java_time_utils.javatime: LocalDate
Represents a date without a time-zone in the ISO-8601 calendar system, such as 2026-07-15.
Constructor
Initializes the LocalDate wrapper.
init (handle obj)- obj handle - The handle value containing the Java reference.
equals
The function that maps to the equals method of java.lang.Object.
Method included from *Object
wait
function wait() returns InterruptedException|()The function that maps to the wait method of java.lang.Object.
Method included from *Object
toString
function toString() returns stringReturns the string representation of this date in ISO-8601 format.
Return Type
- string - The string form (e.g., "2026-07-15").
atStartOfDay
function atStartOfDay() returns LocalDateTimeReturns a LocalDateTime formed from this date at the start of the day (00:00).
Return Type
- LocalDateTime - The resulting LocalDateTime.
atTime
function atTime(int hour, int minute) returns LocalDateTimeCombines this date with the specified time to create a LocalDateTime.
Return Type
- LocalDateTime - The resulting LocalDateTime.
atTimeDetailed
function atTimeDetailed(int hour, int minute, int second) returns LocalDateTimeCombines this date with the specified time (hours, minutes, seconds) to create a LocalDateTime.
Return Type
- LocalDateTime - The resulting LocalDateTime.
atTimeFull
function atTimeFull(int hour, int minute, int second, int nano) returns LocalDateTimeCombines this date with the specified time (hours, minutes, seconds, nanos) to create a LocalDateTime.
Parameters
- hour int - The hour.
- minute int - The minute.
- second int - The second.
- nano int - The nanosecond.
Return Type
- LocalDateTime - The resulting LocalDateTime.
atLocalTime
function atLocalTime(LocalTime time) returns LocalDateTimeCombines this date with the specified LocalTime to create a LocalDateTime.
Parameters
- time LocalTime - The LocalTime to combine with this date.
Return Type
- LocalDateTime - The resulting LocalDateTime.
datesUntil
Returns a stream of dates from this date until the specified end date.
Parameters
- endExclusive LocalDate - The end date, exclusive.
Return Type
- Stream - A stream of dates.
'equals
Checks if this date is equal to another object.
Parameters
- other Object - The object to check equality with.
Return Type
- boolean - True if equal, false otherwise.
getChronology
function getChronology() returns IsoChronologyReturns the chronology of this date.
Return Type
- IsoChronology - The ISO chronology.
getClass
function getClass() returns ClassReturns the class of this object.
Return Type
- Class - The Java class instance.
getDayOfMonth
function getDayOfMonth() returns intReturns the day-of-month.
Return Type
- int - The day-of-month, from 1 to 31.
getDayOfWeek
function getDayOfWeek() returns DayOfWeekReturns the day-of-week.
Return Type
- DayOfWeek - The day-of-week enum.
getDayOfYear
function getDayOfYear() returns intReturns the day-of-year.
Return Type
- int - The day-of-year, from 1 to 365 or 366.
getEra
function getEra() returns IsoEraReturns the era.
Return Type
- IsoEra - The era constant.
getMonth
function getMonth() returns MonthReturns the month-of-year.
Return Type
- Month - The month enum.
getMonthValue
function getMonthValue() returns intReturns the month-of-year value (1-12).
Return Type
- int - The month-of-year.
getYear
function getYear() returns intReturns the year.
Return Type
- int - The year.
hashCode
function hashCode() returns intReturns the hash code for this date.
Return Type
- int - The hash code.
isLeapYear
function isLeapYear() returns booleanChecks if the year is a leap year.
Return Type
- boolean - True if the year is a leap year.
lengthOfMonth
function lengthOfMonth() returns intReturns the length of the month represented by this date.
Return Type
- int - The length of the month.
lengthOfYear
function lengthOfYear() returns intReturns the length of the year represented by this date.
Return Type
- int - The length of the year.
minusDays
Returns a copy of this date with the specified number of days subtracted.
Parameters
- days int - The days to subtract.
Return Type
- LocalDate - A date with the days subtracted.
minusMonths
Returns a copy of this date with the specified number of months subtracted.
Parameters
- months int - The months to subtract.
Return Type
- LocalDate - A date with the months subtracted.
minusWeeks
Returns a copy of this date with the specified number of weeks subtracted.
Parameters
- weeks int - The number of weeks to subtract.
Return Type
- LocalDate - A new LocalDate with the weeks subtracted.
minusYears
Returns a copy of this date with the specified number of years subtracted.
Parameters
- years int - The number of years to subtract.
Return Type
- LocalDate - A new LocalDate with the years subtracted.
notify
function notify()Wakes up a single thread that is waiting on this object's monitor. WARNING: This is a low-level Java synchronization method. Avoid using it in business logic.
notifyAll
function notifyAll()Wakes up all threads that are waiting on this object's monitor. WARNING: This is a low-level Java synchronization method. Avoid using it in business logic.
plusDays
Returns a copy of this date with the specified number of days added.
Parameters
- days int - The number of days to add, may be negative.
Return Type
- LocalDate - A new LocalDate with the days added.
plusMonths
Returns a copy of this date with the specified number of months added.
Parameters
- months int - The number of months to add, may be negative.
Return Type
- LocalDate - A new LocalDate with the months added.
plusWeeks
Returns a copy of this date with the specified number of weeks added.
Parameters
- weeks int - The number of weeks to add, may be negative.
Return Type
- LocalDate - A new LocalDate with the weeks added.
plusYears
Returns a copy of this date with the specified number of years added.
Parameters
- years int - The number of years to add, may be negative.
Return Type
- LocalDate - A new LocalDate with the years added.
toEpochDay
function toEpochDay() returns intReturns the epoch day count.
Return Type
- int - The epoch day count.
'wait
function 'wait() returns InterruptedException?Causes the current thread to wait until notified. WARNING: Low-level Java synchronization method. Use with caution.
Return Type
- InterruptedException? - An InterruptedException if the thread is interrupted while waiting.
wait2
function wait2(int timeoutMillis) returns InterruptedException?Causes the current thread to wait until notified or the specified time elapses. WARNING: Low-level Java synchronization method. Use with caution.
Parameters
- timeoutMillis int - The maximum time to wait in milliseconds.
Return Type
- InterruptedException? - An InterruptedException if the thread is interrupted while waiting.
wait3
function wait3(int timeoutMillis, int nanos) returns InterruptedException?Causes the current thread to wait until notified, with the specified timeout. WARNING: Low-level Java synchronization method. Use with caution.
Parameters
- timeoutMillis int - The maximum time to wait in milliseconds.
- nanos int - Additional nanoseconds to wait.
Return Type
- InterruptedException? - An InterruptedException if the thread is interrupted while waiting.
withDayOfMonth
Returns a copy of this date with the day-of-month altered.
Parameters
- dayOfMonth int - The day-of-month to set (1-31).
Return Type
- LocalDate - A new LocalDate with the day-of-month set.
withDayOfYear
Returns a copy of this date with the day-of-year altered.
Parameters
- dayOfYear int - The day-of-year to set (1-365/366).
Return Type
- LocalDate - A new LocalDate with the day-of-year set.
withMonth
Returns a copy of this date with the month-of-year altered.
Parameters
- month int - The month-of-year to set (1-12).
Return Type
- LocalDate - A new LocalDate with the month set.
withYear
Returns a copy of this date with the year altered.
Parameters
- year int - The year to set.
Return Type
- LocalDate - A new LocalDate with the year set.
Fields
- Fields Included from *JObject
- jObj handle
- Fields Included from *Object
- jObj handle
- jObj handle - The handle to the underlying Java object.
java_time_utils.javatime: LocalDateTime
Represents a date-time without a time-zone in the ISO-8601 calendar system, such as 2026-07-15T14:28:19.
Constructor
Initializes the LocalDateTime wrapper.
init (handle obj)- obj handle - The handle value containing the Java reference.
equals
The function that maps to the equals method of java.lang.Object.
Method included from *Object
wait
function wait() returns InterruptedException|()The function that maps to the wait method of java.lang.Object.
Method included from *Object
toString
function toString() returns stringReturns the string representation of this date-time in ISO-8601 format.
Return Type
- string - The string form (e.g., "2026-07-15T14:28:19").
'equals
Checks if this date-time is equal to another object.
Parameters
- other Object - The object to check equality with.
Return Type
- boolean - True if equal, false otherwise.
getChronology
function getChronology() returns ChronologyReturns the chronology of this date-time.
Return Type
- Chronology - The ISO chronology.
getClass
function getClass() returns ClassReturns the class of this object.
Return Type
- Class - The Java class instance.
getDayOfMonth
function getDayOfMonth() returns intReturns the day-of-month.
Return Type
- int - The day-of-month, from 1 to 31.
getDayOfWeek
function getDayOfWeek() returns DayOfWeekReturns the day-of-week.
Return Type
- DayOfWeek - The day-of-week enum.
getDayOfYear
function getDayOfYear() returns intReturns the day-of-year.
Return Type
- int - The day-of-year, from 1 to 365 or 366.
getHour
function getHour() returns intReturns the hour-of-day.
Return Type
- int - The hour-of-day, from 0 to 23.
getMinute
function getMinute() returns intReturns the minute-of-hour.
Return Type
- int - The minute-of-hour, from 0 to 59.
getMonth
function getMonth() returns MonthReturns the month-of-year.
Return Type
- Month - The month enum.
getMonthValue
function getMonthValue() returns intReturns the month-of-year value (1-12).
Return Type
- int - The month-of-year.
getNano
function getNano() returns intReturns the nano-of-second.
Return Type
- int - The nano-of-second, from 0 to 999,999,999.
getSecond
function getSecond() returns intReturns the second-of-minute.
Return Type
- int - The second-of-minute, from 0 to 59.
getYear
function getYear() returns intReturns the year.
Return Type
- int - The year.
hashCode
function hashCode() returns intReturns the hash code for this date-time.
Return Type
- int - The hash code.
minusDays
function minusDays(int days) returns LocalDateTimeReturns a copy of this date-time with the specified number of days subtracted.
Parameters
- days int - The days to subtract.
Return Type
- LocalDateTime - A new LocalDateTime with the days subtracted.
minusHours
function minusHours(int hours) returns LocalDateTimeReturns a copy of this date-time with the specified number of hours subtracted.
Parameters
- hours int - The hours to subtract.
Return Type
- LocalDateTime - A new LocalDateTime with the hours subtracted.
minusMinutes
function minusMinutes(int minutes) returns LocalDateTimeReturns a copy of this date-time with the specified number of minutes subtracted.
Parameters
- minutes int - The minutes to subtract.
Return Type
- LocalDateTime - A new LocalDateTime with the minutes subtracted.
minusMonths
function minusMonths(int months) returns LocalDateTimeReturns a copy of this date-time with the specified number of months subtracted.
Parameters
- months int - The months to subtract.
Return Type
- LocalDateTime - A new LocalDateTime with the months subtracted.
minusNanos
function minusNanos(int nanos) returns LocalDateTimeReturns a copy of this date-time with the specified number of nanoseconds subtracted.
Parameters
- nanos int - The nanoseconds to subtract.
Return Type
- LocalDateTime - A new LocalDateTime with the nanoseconds subtracted.
minusSeconds
function minusSeconds(int seconds) returns LocalDateTimeReturns a copy of this date-time with the specified number of seconds subtracted.
Parameters
- seconds int - The seconds to subtract.
Return Type
- LocalDateTime - A new LocalDateTime with the seconds subtracted.
minusWeeks
function minusWeeks(int weeks) returns LocalDateTimeReturns a copy of this date-time with the specified number of weeks subtracted.
Parameters
- weeks int - The weeks to subtract.
Return Type
- LocalDateTime - A new LocalDateTime with the weeks subtracted.
minusYears
function minusYears(int years) returns LocalDateTimeReturns a copy of this date-time with the specified number of years subtracted.
Parameters
- years int - The years to subtract.
Return Type
- LocalDateTime - A new LocalDateTime with the years subtracted.
notify
function notify()Wakes up a single thread that is waiting on this object's monitor. WARNING: Low-level Java synchronization method. Avoid using in business logic.
notifyAll
function notifyAll()Wakes up all threads that are waiting on this object's monitor. WARNING: Low-level Java synchronization method. Avoid using in business logic.
plusDays
function plusDays(int days) returns LocalDateTimeReturns a copy of this date-time with the specified number of days added.
Parameters
- days int - The number of days to add.
Return Type
- LocalDateTime - A new LocalDateTime with the days added.
plusHours
function plusHours(int hours) returns LocalDateTimeReturns a copy of this date-time with the specified number of hours added.
Parameters
- hours int - The number of hours to add.
Return Type
- LocalDateTime - A new LocalDateTime with the hours added.
plusMinutes
function plusMinutes(int minutes) returns LocalDateTimeReturns a copy of this date-time with the specified number of minutes added.
Parameters
- minutes int - The number of minutes to add.
Return Type
- LocalDateTime - A new LocalDateTime with the minutes added.
plusMonths
function plusMonths(int months) returns LocalDateTimeReturns a copy of this date-time with the specified number of months added.
Parameters
- months int - The number of months to add.
Return Type
- LocalDateTime - A new LocalDateTime with the months added.
plusNanos
function plusNanos(int nanos) returns LocalDateTimeReturns a copy of this date-time with the specified number of nanoseconds added.
Parameters
- nanos int - The number of nanoseconds to add.
Return Type
- LocalDateTime - A new LocalDateTime with the nanoseconds added.
plusSeconds
function plusSeconds(int seconds) returns LocalDateTimeReturns a copy of this date-time with the specified number of seconds added.
Parameters
- seconds int - The number of seconds to add.
Return Type
- LocalDateTime - A new LocalDateTime with the seconds added.
plusWeeks
function plusWeeks(int weeks) returns LocalDateTimeReturns a copy of this date-time with the specified number of weeks added.
Parameters
- weeks int - The number of weeks to add.
Return Type
- LocalDateTime - A new LocalDateTime with the weeks added.
plusYears
function plusYears(int years) returns LocalDateTimeReturns a copy of this date-time with the specified number of years added.
Parameters
- years int - The number of years to add.
Return Type
- LocalDateTime - A new LocalDateTime with the years added.
toLocalDate
function toLocalDate() returns LocalDateGets the LocalDate part of this date-time.
Return Type
- LocalDate - The date part of this date-time.
toLocalTime
function toLocalTime() returns LocalTimeGets the LocalTime part of this date-time.
Return Type
- LocalTime - The time part of this date-time.
'wait
function 'wait() returns InterruptedException?Causes the current thread to wait until notified. WARNING: Low-level Java synchronization method. Use with caution.
Return Type
- InterruptedException? - An InterruptedException if the thread is interrupted while waiting.
wait2
function wait2(int timeoutMillis) returns InterruptedException?Causes the current thread to wait until notified or the specified time elapses. WARNING: Low-level Java synchronization method. Use with caution.
Parameters
- timeoutMillis int - The maximum time to wait in milliseconds.
Return Type
- InterruptedException? - An InterruptedException if the thread is interrupted while waiting.
wait3
function wait3(int timeoutMillis, int nanos) returns InterruptedException?Causes the current thread to wait until notified, with the specified timeout. WARNING: Low-level Java synchronization method. Use with caution.
Parameters
- timeoutMillis int - The maximum time to wait in milliseconds.
- nanos int - Additional nanoseconds to wait.
Return Type
- InterruptedException? - An InterruptedException if the thread is interrupted while waiting.
withDayOfMonth
function withDayOfMonth(int dayOfMonth) returns LocalDateTimeReturns a copy of this date-time with the day-of-month altered.
Parameters
- dayOfMonth int - The day-of-month to set (1-31).
Return Type
- LocalDateTime - A new LocalDateTime with the day-of-month set.
withDayOfYear
function withDayOfYear(int dayOfYear) returns LocalDateTimeReturns a copy of this date-time with the day-of-year altered.
Parameters
- dayOfYear int - The day-of-year to set (1-365/366).
Return Type
- LocalDateTime - A new LocalDateTime with the day-of-year set.
withHour
function withHour(int hour) returns LocalDateTimeReturns a copy of this date-time with the hour-of-day altered.
Parameters
- hour int - The hour-of-day to set (0-23).
Return Type
- LocalDateTime - A new LocalDateTime with the hour set.
withMinute
function withMinute(int minute) returns LocalDateTimeReturns a copy of this date-time with the minute-of-hour altered.
Parameters
- minute int - The minute-of-hour to set (0-59).
Return Type
- LocalDateTime - A new LocalDateTime with the minute set.
withMonth
function withMonth(int month) returns LocalDateTimeReturns a copy of this date-time with the month-of-year altered.
Parameters
- month int - The month-of-year to set (1-12).
Return Type
- LocalDateTime - A new LocalDateTime with the month set.
withNano
function withNano(int nano) returns LocalDateTimeReturns a copy of this date-time with the nano-of-second altered.
Parameters
- nano int - The nano-of-second to set (0-999,999,999).
Return Type
- LocalDateTime - A new LocalDateTime with the nano-of-second set.
withSecond
function withSecond(int second) returns LocalDateTimeReturns a copy of this date-time with the second-of-minute altered.
Parameters
- second int - The second-of-minute to set (0-59).
Return Type
- LocalDateTime - A new LocalDateTime with the second-of-minute set.
withYear
function withYear(int year) returns LocalDateTimeReturns a copy of this date-time with the year altered.
Parameters
- year int - The year to set.
Return Type
- LocalDateTime - A new LocalDateTime with the year set.
Fields
- Fields Included from *JObject
- jObj handle
- Fields Included from *Object
- jObj handle
- jObj handle - The handle field that stores the reference to the Java object.
java_time_utils.javatime: LocalTime
A time without a time-zone in the ISO-8601 calendar system, such as 10:15:30. This is a value-based class; use of identity-sensitive operations on instances of LocalTime may have unpredictable results and should be avoided.
Constructor
Initializes the class with a handle to a Java object.
init (handle obj)- obj handle - The handle reference to the Java object.
equals
The function that maps to the equals method of java.lang.Object.
Method included from *Object
wait
function wait() returns InterruptedException|()The function that maps to the wait method of java.lang.Object.
Method included from *Object
toString
function toString() returns stringReturns the ISO-8601 string representation of this time.
Return Type
- string - The time as a string, e.g., 10:15:30.
atDate
function atDate(LocalDate date) returns LocalDateTimeCombines this time with a date to create a LocalDateTime.
Parameters
- date LocalDate - The date to combine with.
Return Type
- LocalDateTime - The local date-time formed from this time and the specified date.
compareTo
Compares this time to another time.
Parameters
- other LocalTime - The other time to compare to.
Return Type
- int - A negative integer, zero, or a positive integer as this time is less than, equal to, or greater than the specified time.
'equals
Checks if this time is equal to another object.
Parameters
- other Object - The object to check for equality.
Return Type
- boolean - True if this time is equal to the specified object.
getClass
function getClass() returns ClassReturns the runtime class of this object.
Return Type
- Class - The Class object representing the runtime class.
getHour
function getHour() returns intGets the hour-of-day field.
Return Type
- int - The hour-of-day, from 0 to 23.
getMinute
function getMinute() returns intGets the minute-of-hour field.
Return Type
- int - The minute-of-hour, from 0 to 59.
getNano
function getNano() returns intGets the nano-of-second field.
Return Type
- int - The nano-of-second, from 0 to 999,999,999.
getSecond
function getSecond() returns intGets the second-of-minute field.
Return Type
- int - The second-of-minute, from 0 to 59.
hashCode
function hashCode() returns intReturns the hash code for this time.
Return Type
- int - A suitable hash code.
isAfter
Checks if this time is after the specified time.
Parameters
- other LocalTime - The other time to compare to.
Return Type
- boolean - True if this time is after the specified time.
isBefore
Checks if this time is before the specified time.
Parameters
- other LocalTime - The other time to compare to.
Return Type
- boolean - True if this time is before the specified time.
minusHours
Returns a copy of this time with the specified number of hours subtracted.
Parameters
- hours int - The hours to subtract.
Return Type
- LocalTime - A LocalTime based on this one with the hours subtracted.
minusMinutes
Returns a copy of this time with the specified number of minutes subtracted.
Parameters
- minutes int - The minutes to subtract.
Return Type
- LocalTime - A LocalTime based on this one with the minutes subtracted.
minusNanos
Returns a copy of this time with the specified number of nanoseconds subtracted.
Parameters
- nanos int - The nanoseconds to subtract.
Return Type
- LocalTime - A LocalTime based on this one with the nanoseconds subtracted.
minusSeconds
Returns a copy of this time with the specified number of seconds subtracted.
Parameters
- seconds int - The seconds to subtract.
Return Type
- LocalTime - A LocalTime based on this one with the seconds subtracted.
notify
function notify()Wakes up a single thread that is waiting on this object's monitor.
notifyAll
function notifyAll()Wakes up all threads that are waiting on this object's monitor.
plusHours
Returns a copy of this time with the specified number of hours added.
Parameters
- hours int - The hours to add.
Return Type
- LocalTime - A LocalTime based on this one with the hours added.
plusMinutes
Returns a copy of this time with the specified number of minutes added.
Parameters
- minutes int - The minutes to add.
Return Type
- LocalTime - A LocalTime based on this one with the minutes added.
plusNanos
Returns a copy of this time with the specified number of nanoseconds added.
Parameters
- nanos int - The nanoseconds to add.
Return Type
- LocalTime - A LocalTime based on this one with the nanoseconds added.
plusSeconds
Returns a copy of this time with the specified number of seconds added.
Parameters
- seconds int - The seconds to add.
Return Type
- LocalTime - A LocalTime based on this one with the seconds added.
toNanoOfDay
function toNanoOfDay() returns intExtracts the time as nanoseconds of day.
Return Type
- int - The nanoseconds of day.
toSecondOfDay
function toSecondOfDay() returns intExtracts the time as seconds of day.
Return Type
- int - The seconds of day.
'wait
function 'wait() returns InterruptedException?Waits to be notified by another thread.
Return Type
- InterruptedException? - An error if the wait is interrupted, or () if successful.
wait2
function wait2(int timeoutMillis) returns InterruptedException?Waits to be notified by another thread for a specified amount of time.
Parameters
- timeoutMillis int - The maximum time to wait in milliseconds.
Return Type
- InterruptedException? - An error if the wait is interrupted, or () if successful.
wait3
function wait3(int timeoutMillis, int nanos) returns InterruptedException?Waits to be notified by another thread for a specified amount of time.
Parameters
- timeoutMillis int - The maximum time to wait in milliseconds.
- nanos int - The additional nanoseconds to wait.
Return Type
- InterruptedException? - An error if the wait is interrupted, or () if successful.
withHour
Returns a copy of this time with the hour-of-day altered.
Parameters
- hour int - The hour-of-day to set in the result.
Return Type
- LocalTime - A LocalTime based on this one with the requested hour.
withMinute
Returns a copy of this time with the minute-of-hour altered.
Parameters
- minute int - The minute-of-hour to set in the result.
Return Type
- LocalTime - A LocalTime based on this one with the requested minute.
withNano
Returns a copy of this time with the nano-of-second altered.
Parameters
- nano int - The nano-of-second to set in the result.
Return Type
- LocalTime - A LocalTime based on this one with the requested nano-of-second.
withSecond
Returns a copy of this time with the second-of-minute altered.
Parameters
- second int - The second-of-minute to set in the result.
Return Type
- LocalTime - A LocalTime based on this one with the requested second.
Fields
- Fields Included from *JObject
- jObj handle
- Fields Included from *Object
- jObj handle
- jObj handle - The handle to the underlying Java object.
java_time_utils.javatime: Month
Ballerina class mapping for the Java java.time.Month class.
Constructor
The init function of the Ballerina class mapping the java.time.Month Java class.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.Month Java class.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.Monthobject.
java_time_utils.javatime: Object
Ballerina class mapping for the Java java.lang.Object class.
Constructor
The init function of the Ballerina class mapping the java.lang.Object Java class.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.lang.Object Java class.
Return Type
- string - The
stringform of the Java object instance.
'equals
The function that maps to the equals method of java.lang.Object.
Parameters
- arg0 Object - The
Objectvalue required to map with the Java method parameter.
Return Type
- boolean - The
booleanvalue returning from the Java mapping.
getClass
function getClass() returns ClassThe function that maps to the getClass method of java.lang.Object.
Return Type
- Class - The
Classvalue returning from the Java mapping.
hashCode
function hashCode() returns intThe function that maps to the hashCode method of java.lang.Object.
Return Type
- int - The
intvalue returning from the Java mapping.
notify
function notify()The function that maps to the notify method of java.lang.Object.
notifyAll
function notifyAll()The function that maps to the notifyAll method of java.lang.Object.
'wait
function 'wait() returns InterruptedException?The function that maps to the wait method of java.lang.Object.
Return Type
- InterruptedException? - The
InterruptedExceptionvalue returning from the Java mapping.
wait2
function wait2(int arg0) returns InterruptedException?The function that maps to the wait method of java.lang.Object.
Parameters
- arg0 int - The
intvalue required to map with the Java method parameter.
Return Type
- InterruptedException? - The
InterruptedExceptionvalue returning from the Java mapping.
wait3
function wait3(int arg0, int arg1) returns InterruptedException?The function that maps to the wait method of java.lang.Object.
Parameters
- arg0 int - The
intvalue required to map with the Java method parameter.
- arg1 int - The
intvalue required to map with the Java method parameter.
Return Type
- InterruptedException? - The
InterruptedExceptionvalue returning from the Java mapping.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.lang.Objectobject.
java_time_utils.javatime: OffsetDateTime
Ballerina class mapping for the Java java.time.OffsetDateTime class.
Constructor
The init function of the Ballerina class mapping the java.time.OffsetDateTime Java class.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.OffsetDateTime Java class.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.OffsetDateTimeobject.
java_time_utils.javatime: OffsetTime
Ballerina class mapping for the Java java.time.OffsetTime class.
Constructor
The init function of the Ballerina class mapping the java.time.OffsetTime Java class.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.OffsetTime Java class.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.OffsetTimeobject.
java_time_utils.javatime: Period
Ballerina class mapping for the Java java.time.Period class.
Constructor
The init function of the Ballerina class mapping the java.time.Period Java class.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.Period Java class.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.Periodobject.
java_time_utils.javatime: Stream
Ballerina class mapping for the Java java.util.stream.Stream interface.
Constructor
The init function of the Ballerina class mapping the java.util.stream.Stream Java interface.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.util.stream.Stream Java interface.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.util.stream.Streamobject.
java_time_utils.javatime: Temporal
Ballerina class mapping for the Java java.time.temporal.Temporal interface.
Constructor
The init function of the Ballerina class mapping the java.time.temporal.Temporal Java interface.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.temporal.Temporal Java interface.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.temporal.Temporalobject.
java_time_utils.javatime: TemporalAccessor
Ballerina class mapping for the Java java.time.temporal.TemporalAccessor interface.
Constructor
The init function of the Ballerina class mapping the java.time.temporal.TemporalAccessor Java interface.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.temporal.TemporalAccessor Java interface.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.temporal.TemporalAccessorobject.
java_time_utils.javatime: TemporalAdjuster
Ballerina class mapping for the Java java.time.temporal.TemporalAdjuster interface.
Constructor
The init function of the Ballerina class mapping the java.time.temporal.TemporalAdjuster Java interface.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.temporal.TemporalAdjuster Java interface.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.temporal.TemporalAdjusterobject.
java_time_utils.javatime: TemporalAmount
Ballerina class mapping for the Java java.time.temporal.TemporalAmount interface.
Constructor
The init function of the Ballerina class mapping the java.time.temporal.TemporalAmount Java interface.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.temporal.TemporalAmount Java interface.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.temporal.TemporalAmountobject.
java_time_utils.javatime: TemporalField
Ballerina class mapping for the Java java.time.temporal.TemporalField interface.
Constructor
The init function of the Ballerina class mapping the java.time.temporal.TemporalField Java interface.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.temporal.TemporalField Java interface.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.temporal.TemporalFieldobject.
java_time_utils.javatime: TemporalQuery
Ballerina class mapping for the Java java.time.temporal.TemporalQuery interface.
Constructor
The init function of the Ballerina class mapping the java.time.temporal.TemporalQuery Java interface.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.temporal.TemporalQuery Java interface.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.temporal.TemporalQueryobject.
java_time_utils.javatime: TemporalUnit
Ballerina class mapping for the Java java.time.temporal.TemporalUnit interface.
Constructor
The init function of the Ballerina class mapping the java.time.temporal.TemporalUnit Java interface.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.temporal.TemporalUnit Java interface.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.temporal.TemporalUnitobject.
java_time_utils.javatime: ValueRange
Ballerina class mapping for the Java java.time.temporal.ValueRange class.
Constructor
The init function of the Ballerina class mapping the java.time.temporal.ValueRange Java class.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.temporal.ValueRange Java class.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.temporal.ValueRangeobject.
java_time_utils.javatime: ZonedDateTime
Ballerina class mapping for the Java java.time.ZonedDateTime class.
Constructor
The init function of the Ballerina class mapping the java.time.ZonedDateTime Java class.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.ZonedDateTime Java class.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.ZonedDateTimeobject.
java_time_utils.javatime: ZoneId
Ballerina class mapping for the Java java.time.ZoneId class.
Constructor
The init function of the Ballerina class mapping the java.time.ZoneId Java class.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.ZoneId Java class.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.ZoneIdobject.
java_time_utils.javatime: ZoneOffset
Ballerina class mapping for the Java java.time.ZoneOffset class.
Constructor
The init function of the Ballerina class mapping the java.time.ZoneOffset Java class.
init (handle obj)- obj handle - The
handlevalue containing the Java reference of the object.
toString
function toString() returns stringThe function to retrieve the string representation of the Ballerina class mapping the java.time.ZoneOffset Java class.
Return Type
- string - The
stringform of the Java object instance.
Fields
- Fields Included from *JObject
- jObj handle
- jObj handle - The
handlefield that stores the reference to thejava.time.ZoneOffsetobject.
Constants
java_time_utils.javatime: INTERRUPTEDEXCEPTION
Errors
java_time_utils.javatime: InterruptedException
Import
import kruutteri1/java_time_utils.javatime;Metadata
Released date: 4 days ago
Version: 1.0.1
License: Apache-2.0
Compatibility
Platform: java21
Ballerina version: 2201.13.4
GraalVM compatible: Yes
Pull count
Total: 2
Current verison: 0
Weekly downloads
Keywords
java-time
date
time
localdate
localdatetime
localtime
Contributors
Dependencies