@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="Date")
public class JsDate
extends JsObject
| Constructor and Description |
|---|
JsDate() |
JsDate(double date) |
JsDate(int year,
int month) |
JsDate(int year,
int month,
int date) |
JsDate(int year,
int month,
int date,
int hours) |
JsDate(int year,
int month,
int date,
int hours,
int minute) |
JsDate(int year,
int month,
int date,
int hours,
int minute,
int second) |
JsDate(int year,
int month,
int date,
int hours,
int minute,
int second,
int ms) |
JsDate(java.lang.String date) |
| Modifier and Type | Method and Description |
|---|---|
int |
getDate()
The getDate() method returns the day of the month for the specified date according to local time.
|
int |
getDay()
The getDay() method returns the day of the week for the specified date according to local time, where 0 represents Sunday.
|
int |
getFullYear()
The getFullYear() method returns the year of the specified date according to local time.
|
int |
getHours()
The getHours() method returns the hour for the specified date, according to local time.
|
int |
getMilliseconds()
The getMilliseconds() method returns the milliseconds in the specified date according to local time.
|
int |
getMinutes()
The getMinutes() method returns the minutes in the specified date according to local time.
|
int |
getMonth()
The getMonth() method returns the month in the specified date according to local time, as a zero-based value (where zero indicates the first month of the year).
|
int |
getSeconds()
The getSeconds() method returns the seconds in the specified date according to local time.
|
double |
getTime()
The getTime() method returns the number of milliseconds* since the Unix Epoch.
|
int |
getTimezoneOffset()
The getTimezoneOffset() method returns the difference, in minutes, between a date as evaluated in the UTC time zone, and the same date as evaluated in the local time zone.
|
int |
getUTCDate()
The getUTCDate() method returns the day of the month(from 1 to 31) in the specified date according to universal time.
|
int |
getUTCDay()
The getUTCDay() method returns the day of the week in the specified date according to universal time, where 0 represents Sunday.
|
int |
getUTCFullYear()
The getUTCFullYear() method returns the year in the specified date according to universal time.
|
int |
getUTCHours()
The getUTCHours() method returns the hours in the specified date according to universal time.
|
int |
getUTCMilliseconds()
The getUTCMilliseconds() method returns the milliseconds portion of the time object's value.
|
int |
getUTCMinutes()
The getUTCMinutes() method returns the minutes in the specified date according to universal time.
|
int |
getUTCMonth()
The getUTCMonth() returns the month of the specified date according to universal time, as a zero-based value (where zero indicates the first month of the year).
|
int |
getUTCSeconds()
The getUTCSeconds() method returns the seconds in the specified date according to universal time.
|
static double |
now()
The static Date.now() method returns the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC.
|
static double |
parse(java.lang.String date)
The Date.parse() method parses a string representation of a date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC or NaN if the string is unrecognized or, in some cases, contains illegal date values (e.g.
|
double |
setDate(int dayValue)
The setDate() method changes the day of the month of a given Date instance, based on local time.
|
double |
setFullYear(int yearValue)
The setFullYear() method sets the full year for a specified date according to local time.
|
double |
setFullYear(int yearValue,
int monthValue)
The setFullYear() method sets the full year for a specified date according to local time.
|
double |
setFullYear(int yearValue,
int monthValue,
int dayValue)
The setFullYear() method sets the full year for a specified date according to local time.
|
double |
setHours(int hoursValue)
The setHours() method sets the hours for a specified date according to local time, and returns the number of milliseconds since January 1, 1970 00:00:00 UTC until the time represented by the updated Date instance.
|
double |
setHours(int hoursValue,
int minutesValue)
The setHours() method sets the hours for a specified date according to local time, and returns the number of milliseconds since January 1, 1970 00:00:00 UTC until the time represented by the updated Date instance.
|
double |
setHours(int hoursValue,
int minutesValue,
int secondsValue)
The setHours() method sets the hours for a specified date according to local time, and returns the number of milliseconds since January 1, 1970 00:00:00 UTC until the time represented by the updated Date instance.
|
double |
setHours(int hoursValue,
int minutesValue,
int secondsValue,
int msValue)
The setHours() method sets the hours for a specified date according to local time, and returns the number of milliseconds since January 1, 1970 00:00:00 UTC until the time represented by the updated Date instance.
|
double |
setMilliseconds(int millisecondsValue)
The setMilliseconds() method sets the milliseconds for a specified date according to local time.
|
double |
setMinutes(int minutesValue)
The setMinutes() method sets the minutes for a specified date according to local time.
|
double |
setMinutes(int minutesValue,
int secondsValue)
The setMinutes() method sets the minutes for a specified date according to local time.
|
double |
setMinutes(int minutesValue,
int secondsValue,
int msValue)
The setMinutes() method sets the minutes for a specified date according to local time.
|
double |
setMonth(int monthValue)
The setMonth() method sets the month for a specified date according to the currently set year.
|
double |
setMonth(int monthValue,
int dayValue)
The setMonth() method sets the month for a specified date according to the currently set year.
|
double |
setSeconds(int secondsValue)
The setSeconds() method sets the seconds for a specified date according to local time.
|
double |
setSeconds(int secondsValue,
int msValue)
The setSeconds() method sets the seconds for a specified date according to local time.
|
double |
setTime(double timeValue)
The setTime() method sets the Date object to the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.
|
double |
setUTCDate(int dayValue)
The setUTCDate() method changes the day of the month of a given Date instance, based on UTC time.
|
double |
setUTCFullYear(int yearValue)
The setUTCFullYear() method sets the full year for a specified date according to universal time.
|
double |
setUTCFullYear(int yearValue,
int monthValue)
The setUTCFullYear() method sets the full year for a specified date according to universal time.
|
double |
setUTCFullYear(int yearValue,
int monthValue,
int dayValue)
The setUTCFullYear() method sets the full year for a specified date according to universal time.
|
double |
setUTCHours(int hoursValue)
The setUTCHours() method sets the hour for a specified date according to universal time, and returns the number of milliseconds since January 1, 1970 00:00:00 UTC until the time represented by the updated Date instance.
|
double |
setUTCHours(int hoursValue,
int minutesValue)
The setUTCHours() method sets the hour for a specified date according to universal time, and returns the number of milliseconds since January 1, 1970 00:00:00 UTC until the time represented by the updated Date instance.
|
double |
setUTCHours(int hoursValue,
int minutesValue,
int secondsValue)
The setUTCHours() method sets the hour for a specified date according to universal time, and returns the number of milliseconds since January 1, 1970 00:00:00 UTC until the time represented by the updated Date instance.
|
double |
setUTCHours(int hoursValue,
int minutesValue,
int secondsValue,
int msValue)
The setUTCHours() method sets the hour for a specified date according to universal time, and returns the number of milliseconds since January 1, 1970 00:00:00 UTC until the time represented by the updated Date instance.
|
double |
setUTCMilliseconds(int millisecondsValue)
The setUTCMilliseconds() method sets the milliseconds for a specified date according to universal time.
|
double |
setUTCMinutes(int minutesValue)
The setUTCMinutes() method sets the minutes for a specified date according to universal time.
|
double |
setUTCMinutes(int minutesValue,
int secondsValue)
The setUTCMinutes() method sets the minutes for a specified date according to universal time.
|
double |
setUTCMinutes(int minutesValue,
int secondsValue,
int msValue)
The setUTCMinutes() method sets the minutes for a specified date according to universal time.
|
double |
setUTCMonth(int monthValue)
The setUTCMonth() method sets the month for a specified date according to universal time.
|
double |
setUTCMonth(int monthValue,
int dayValue)
The setUTCMonth() method sets the month for a specified date according to universal time.
|
double |
setUTCSeconds(int secondsValue)
The setUTCSeconds() method sets the seconds for a specified date according to universal time.
|
double |
setUTCSeconds(int secondsValue,
int msValue)
The setUTCSeconds() method sets the seconds for a specified date according to universal time.
|
java.lang.String |
toDateString()
The toDateString() method returns the date portion of a Date object in English in the following format separated by spaces:
|
java.lang.String |
toISOString()
The toISOString() method returns a string in simplified extended ISO format (ISO 8601), which is always 24 or 27 characters long (YYYY-MM-DDTHH:mm:ss.sssZ or ±YYYYYY-MM-DDTHH:mm:ss.sssZ, respectively).
|
java.lang.String |
toJSON()
The toJSON() method returns a string representation of the Date object.
|
java.lang.String |
toString_()
The toString() method returns a string representing the specified Date object.
|
java.lang.String |
toTimeString()
The toTimeString() method returns the time portion of a Date object in human readable form in English.
|
java.lang.String |
toUTCString()
The toUTCString() method converts a date to a string, using the UTC time zone.
|
static double |
UTC(int year,
int month)
The Date.UTC() method accepts parameters similar to the Date constructor, but treats them as UTC.
|
static double |
UTC(int year,
int month,
int date)
The Date.UTC() method accepts parameters similar to the Date constructor, but treats them as UTC.
|
static double |
UTC(int year,
int month,
int date,
int hours)
The Date.UTC() method accepts parameters similar to the Date constructor, but treats them as UTC.
|
static double |
UTC(int year,
int month,
int date,
int hours,
int minute)
The Date.UTC() method accepts parameters similar to the Date constructor, but treats them as UTC.
|
static double |
UTC(int year,
int month,
int date,
int hours,
int minute,
int second)
The Date.UTC() method accepts parameters similar to the Date constructor, but treats them as UTC.
|
static double |
UTC(int year,
int month,
int date,
int hours,
int minute,
int second,
int ms)
The Date.UTC() method accepts parameters similar to the Date constructor, but treats them as UTC.
|
double |
valueOf()
The valueOf() method returns the primitive value of a Date object.
|
assign, create, create, defineProperties, defineProperty, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, is, isExtensible, isFrozen, isSealed, keys, preventExtensions, seal, setPrototypeOf, valueOf_, valuespublic JsDate()
public JsDate(@Nonnull
java.lang.String date)
public JsDate(double date)
public JsDate(int year,
int month,
int date,
int hours,
int minute,
int second,
int ms)
public JsDate(int year,
int month,
int date,
int hours,
int minute,
int second)
public JsDate(int year,
int month,
int date,
int hours,
int minute)
public JsDate(int year,
int month,
int date,
int hours)
public JsDate(int year,
int month,
int date)
public JsDate(int year,
int month)
public static double now()
public static double parse(@Nonnull
java.lang.String date)
public int getDate()
public int getDay()
public int getFullYear()
public int getHours()
public int getMilliseconds()
public int getMinutes()
public int getMonth()
public int getSeconds()
public double getTime()
public int getTimezoneOffset()
public int getUTCDate()
public int getUTCDay()
public int getUTCFullYear()
public int getUTCHours()
public int getUTCMilliseconds()
public int getUTCMinutes()
public int getUTCMonth()
public int getUTCSeconds()
public double setDate(int dayValue)
public double setFullYear(int yearValue,
int monthValue,
int dayValue)
public double setFullYear(int yearValue,
int monthValue)
public double setFullYear(int yearValue)
public double setHours(int hoursValue,
int minutesValue,
int secondsValue,
int msValue)
public double setHours(int hoursValue,
int minutesValue,
int secondsValue)
public double setHours(int hoursValue,
int minutesValue)
public double setHours(int hoursValue)
public double setMilliseconds(int millisecondsValue)
public double setMinutes(int minutesValue,
int secondsValue,
int msValue)
public double setMinutes(int minutesValue,
int secondsValue)
public double setMinutes(int minutesValue)
public double setMonth(int monthValue,
int dayValue)
public double setMonth(int monthValue)
public double setSeconds(int secondsValue,
int msValue)
public double setSeconds(int secondsValue)
public double setTime(double timeValue)
public double setUTCDate(int dayValue)
public double setUTCFullYear(int yearValue,
int monthValue,
int dayValue)
public double setUTCFullYear(int yearValue,
int monthValue)
public double setUTCFullYear(int yearValue)
public double setUTCHours(int hoursValue,
int minutesValue,
int secondsValue,
int msValue)
public double setUTCHours(int hoursValue,
int minutesValue,
int secondsValue)
public double setUTCHours(int hoursValue,
int minutesValue)
public double setUTCHours(int hoursValue)
public double setUTCMilliseconds(int millisecondsValue)
public double setUTCMinutes(int minutesValue,
int secondsValue,
int msValue)
public double setUTCMinutes(int minutesValue,
int secondsValue)
public double setUTCMinutes(int minutesValue)
public double setUTCMonth(int monthValue,
int dayValue)
public double setUTCMonth(int monthValue)
public double setUTCSeconds(int secondsValue,
int msValue)
public double setUTCSeconds(int secondsValue)
@Nonnull public java.lang.String toDateString()
@Nonnull public java.lang.String toISOString()
@Nonnull public java.lang.String toJSON()
@Nonnull public java.lang.String toTimeString()
@Nonnull public java.lang.String toUTCString()
public double valueOf()
@JsMethod(name="toString") @Nonnull public java.lang.String toString_()
public static double UTC(int year,
int month,
int date,
int hours,
int minute,
int second,
int ms)
public static double UTC(int year,
int month,
int date,
int hours,
int minute,
int second)
public static double UTC(int year,
int month,
int date,
int hours,
int minute)
public static double UTC(int year,
int month,
int date,
int hours)
public static double UTC(int year,
int month,
int date)
public static double UTC(int year,
int month)