Home Reference Source Repository
import {LocalDate} from 'joda/src/LocalDate.js'
public class | source

LocalDate

A date without a time-zone in the ISO-8601 calendar system, such as 2007-12-03.

LocalDate is an immutable date-time object that represents a date, often viewed as year-month-day. Other date fields, such as day-of-year, day-of-week and week-of-year, can also be accessed. For example, the value "2nd October 2007" can be stored in a LocalDate.

This class does not store or represent a time or time-zone. Instead, it is a description of the date, as used for birthdays. It cannot represent an instant on the time-line without additional information such as an offset or time-zone.

Static Method Summary

Static Public Methods
public static

ofEpochDay(epochDay: *): *

Constructor Summary

Public Constructor
public

constructor(year: number, month: number, dayOfMonth: number)

Method Summary

Public Methods
public

day(): number

public
public

plusDays(daysToAdd: *): *

public

Converts this date to the Epoch Day.

public

Outputs this date as a String, such as 2007-12-03.

public

Static Public Methods

public static ofEpochDay(epochDay: *): * source

Params:

NameTypeAttributeDescription
epochDay *

Return:

*

Public Constructors

public constructor(year: number, month: number, dayOfMonth: number) source

Params:

NameTypeAttributeDescription
year number
month number
dayOfMonth number

Public Methods

public day(): number source

Return:

number

gets the day of month

public month(): number source

Return:

number

gets the month

public plusDays(daysToAdd: *): * source

Params:

NameTypeAttributeDescription
daysToAdd *

Return:

*

public toEpochDay(): number source

Converts this date to the Epoch Day.

The Epoch Day count is a simple incrementing count of days where day 0 is 1970-01-01 (ISO). This definition is the same for all chronologies, enabling conversion.

Return:

number

the Epoch Day equivalent to this date

public toString(): string source

Outputs this date as a String, such as 2007-12-03. The output will be in the ISO-8601 format uuuu-MM-dd.

Return:

string

a string representation of this date, not null

public year(): number source

Return:

number

gets the year