Module jls.util.LocalDateTime

Represents a date time independent of any time zone.

Class LocalDateTime

LocalDateTime:new (year, month, day, hour, min, sec, ms) Creates a new LocalDateTime.
localDateTime:getYear () Returns the year of this date.
localDateTime:setYear (value) Sets the year of this date.
localDateTime:isLeapYear () Returns true is this date is in a leap year.
localDateTime:getMonth () Returns the month of this date.
localDateTime:setMonth (value) Sets the month of this date.
localDateTime:getDayOfMonth () Returns the day of month of this date.
localDateTime:setDayOfMonth (value) Sets the day of month of this date.
localDateTime:getDayOfWeek () Returns the day of week of this date.
localDateTime:getHour () Returns the hour of this date.
localDateTime:setHour (value) Sets the hour of this date.
localDateTime:getMinute () Returns the minute of this date.
localDateTime:setMinute (value) Sets the minute of this date.
localDateTime:getSecond () Returns the second of this date.
localDateTime:setSecond (value) Sets the second of this date.
localDateTime:getMillisecond () Returns the milli-second of this date.
localDateTime:setMillisecond (value) Sets the milli-second of this date.
localDateTime:plusYears (value) Adds year to this date.
localDateTime:compareTo (date) Returns a negative, zero or positive value depending if this date is before, equal or after the specified date.


Class LocalDateTime

The LocalDateTime class. The LocalDateTime provides a way to manipulate local date and time with milli seconds precision.
LocalDateTime:new (year, month, day, hour, min, sec, ms)
Creates a new LocalDateTime.

Parameters:

  • year number the year
  • month number the month
  • day number the day
  • hour number the hour
  • min number the min
  • sec number the sec
  • ms number the ms

Returns:

    a new LocalDateTime
localDateTime:getYear ()
Returns the year of this date.

Returns:

    number the year.
localDateTime:setYear (value)
Sets the year of this date.

Parameters:

  • value number the year.

Returns:

    this date.
localDateTime:isLeapYear ()
Returns true is this date is in a leap year.

Returns:

    boolean true is this date is in a leap year.
localDateTime:getMonth ()
Returns the month of this date.

Returns:

    number the month from 1 to 12.
localDateTime:setMonth (value)
Sets the month of this date.

Parameters:

  • value number the month.

Returns:

    this date.
localDateTime:getDayOfMonth ()
Returns the day of month of this date.

Returns:

    number the day of month from 1 to 31.
localDateTime:setDayOfMonth (value)
Sets the day of month of this date.

Parameters:

  • value number the day of month.

Returns:

    this date.
localDateTime:getDayOfWeek ()
Returns the day of week of this date.

Returns:

    number the day of week from 1 to 7, 1 for Sunday.
localDateTime:getHour ()
Returns the hour of this date.

Returns:

    number the hour.
localDateTime:setHour (value)
Sets the hour of this date.

Parameters:

  • value number the hour.

Returns:

    this date.
localDateTime:getMinute ()
Returns the minute of this date.

Returns:

    number the minute.
localDateTime:setMinute (value)
Sets the minute of this date.

Parameters:

  • value number the minute.

Returns:

    this date.
localDateTime:getSecond ()
Returns the second of this date.

Returns:

    number the second.
localDateTime:setSecond (value)
Sets the second of this date.

Parameters:

  • value number the second.

Returns:

    this date.
localDateTime:getMillisecond ()
Returns the milli-second of this date.

Returns:

    number the milli-second.
localDateTime:setMillisecond (value)
Sets the milli-second of this date.

Parameters:

  • value number the milli-second.

Returns:

    this date.
localDateTime:plusYears (value)
Adds year to this date.

Parameters:

  • value number the number of year to add.

Returns:

    this date.
localDateTime:compareTo (date)
Returns a negative, zero or positive value depending if this date is before, equal or after the specified date.

Parameters:

Returns:

    number a negative, zero or positive value depending if this date is before, equal or after the specified date.
generated by LDoc 1.4.6