OracleJavaScript API Reference for Oracle ADF Faces

 

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

org.ecmascript.object
Class Date

org.ecmascript.object.Object
   |
   +--org.ecmascript.object.Date

public class Date
extends Object
The native browser JavaScript object used to work with dates and times.
When constructed, a new Date will be populated with the current date and time.

Note that this object is implemented and supported by the web browser and results of its use may vary.



Field Summary


Fields inherited from org.ecmascript.object.Object

constructor, prototype


Constructor Summary

public
Date()
The native browser JavaScript object used to work with dates and times.


Method Summary

public Number
getDate()
Gets the day of the month (e.g.
public Number
getDay()
Gets the day of the week (e.g.
public Number
getFullYear()
Gets the 4-digit number representing the year.
public Number
getHours()
Gets the hour of the day (e.g.
public Number
getMilliseconds()
Gets the milliseconds division of the day (e.g.
public Number
getMinutes()
Gets the minutes division of the day (e.g.
public Number
getMonth()
Gets the month of the year (e.g.
public Number
getSeconds()
Gets the seconds division of the day (e.g.
public Number
getTime()
Gets the number of milliseconds since midnight of January 1st, 1970 Greenwich Mean Time (GMT).
public Number
getTimezoneOffset()
Gets the number of minutes between the associated time zone and Greenwich Mean Time (GMT).
public Number
getUTCDate()
Gets the day of the month (e.g.
public Number
getUTCDay()
Gets the day of the week (e.g.
public Number
getUTCFullYear()
Gets the 4-digit number representing the year according to Coordinated Universal Time (UTC).
public Number
getUTCHours()
Gets the hour of the day (e.g.
public Number
getUTCMilliseconds()
Gets the milliseconds division of the day (e.g.
public Number
getUTCMinutes()
Gets the minutes division of the day (e.g.
public Number
getUTCMonth()
Gets the month of the year (e.g.
public Number
getUTCSeconds()
Gets the seconds division of the day (e.g.
public Number
getYear()
Deprecated: use getFullYear() instead
public static Number
parse(String dateString)
Gets the number of milliseconds since midnight of January 1st, 1970 Greenwich Mean Time (GMT) represented by dateString.
public Object
setDate(Number dayOfTheMonth)
Sets the day of the month (e.g.
public Object
setFullYear(Number year)
Sets the 4-digit number representing the year.
public Object
setHours(Number hours)
Sets the hour of the day (e.g.
public Object
setMilliseconds(Number milliseconds)
Sets the milliseconds division of the day (e.g.
public Object
setMinutes(Number minutes)
Sets the minutes division of the day (e.g.
public Object
setMonth(Number month)
Sets the month of the year (e.g.
public Object
setSeconds(Number seconds)
Sets the seconds division of the day (e.g.
public Object
setTime(Number milliseconds)
Sets the number of milliseconds since midnight of January 1st, 1970 Greenwich Mean Time (GMT).
public Object
setUTCDate(Number dayOfTheMonth)
Sets the day of the month (e.g.
public Object
setUTCFullYear(Number year)
Sets the 4-digit number representing the year according to Coordinated Universal Time (UTC).
public Object
setUTCHours(Number hours)
Sets the hour of the day (e.g.
public Object
setUTCMilliseconds(Number milliseconds)
Sets the milliseconds division of the day (e.g.
public Object
setUTCMinutes(Number minutes)
Sets the minutes division of the day (e.g.
public Object
setUTCMonth(Number month)
Sets the month of the year (e.g.
public Object
setUTCSeconds(Number seconds)
Sets the seconds division of the day (e.g.
public Object
setYear(Number year)
Deprecated: use setFullYear(Number) instead
public String
toDateString()
Gets a human-readable String representation of the date (non-time) portion of the Date.
public String
toGMTString()
Deprecated: use toUTCString() instead
public String
toLocaleDateString()
Gets a human-readable String representation of the date (non-time) portion of the Date using a format indicated by the browser's Locale.
public String
toLocaleString()
Gets a human-readable String representation of the Date using a format indicated by the browser's Locale.
public String
toLocaleTimeString()
Gets a human-readable String representation of the time (non-date) portion of the Date using a format indicated by the browser's Locale.
public String
toSource()
Gets a source code String representation of the Date.
public String
toString()
Gets a human-readable String representation of the Date.
public String
toTimeString()
Gets a human-readable String representation of the time (non-date) portion of the Date.
public String
toUTCString()
Deprecated: use toUTCString() instead
public static Number
UTC(Number year, Number month, Number dayOfTheMonth, Number hours, Number minutes, Number seconds, Number milliseconds)
Gets the number of milliseconds between the specified point in time since midnight of January 1st, 1970 according to Coordinated Universal Time (UTC).


Field Detail


Constructor Detail


Date

public Date()

The native browser JavaScript object used to work with dates and times.
When constructed, a new Date will be populated with the current date and time.

Note that this object is implemented and supported by the web browser and results of its use may vary.

Method Detail


getDate

public Number getDate()

Gets the day of the month (e.g. a number, 1-31).

Return:
Number - the day of the month

getDay

public Number getDay()

Gets the day of the week (e.g. a number, 0-6) represented by the number of days after Sunday.

Return:
Number - the day of the week represented by the number of days after Sunday, e.g. 0 = Sunday, 1 = Monday, etc.

getFullYear

public Number getFullYear()

Gets the 4-digit number representing the year.

Return:
Number - the 4-digit number representing the year

getHours

public Number getHours()

Gets the hour of the day (e.g. a number, 0-23).

Return:
Number - the hour of the day

getMilliseconds

public Number getMilliseconds()

Gets the milliseconds division of the day (e.g. a number, 0-999).

Return:
Number - the milliseconds division of the day

getMinutes

public Number getMinutes()

Gets the minutes division of the day (e.g. a number, 0-59).

Return:
Number - the minutes division of the day

getMonth

public Number getMonth()

Gets the month of the year (e.g. a number, 0-11) represented by the number of months after January.

Return:
Number - the month of the year represented by the number of months after January, e.g. 0 = January, 1 = February, etc.

getSeconds

public Number getSeconds()

Gets the seconds division of the day (e.g. a number, 0-59).

Return:
Number - the seconds division of the day

getTime

public Number getTime()

Gets the number of milliseconds since midnight of January 1st, 1970 Greenwich Mean Time (GMT).

Return:
Number - the number of milliseconds since midnight of January 1st, 1970 Greenwich Mean Time (GMT)

getTimezoneOffset

public Number getTimezoneOffset()

Gets the number of minutes between the associated time zone and Greenwich Mean Time (GMT).

Return:
Number - the number of minutes between the associated time zone and Greenwich Mean Time (GMT)

getUTCDate

public Number getUTCDate()

Gets the day of the month (e.g. a number, 1-31) according to Coordinated Universal Time (UTC).

Return:
Number - the day of the month according to Coordinated Universal Time (UTC)

getUTCDay

public Number getUTCDay()

Gets the day of the week (e.g. a number, 0-6) represented by the number of days after Sunday according to Coordinated Universal Time (UTC).

Return:
Number - the day of the week represented by the number of days after Sunday, e.g. 0 = Sunday, 1 = Monday, etc. according to Coordinated Universal Time (UTC)

getUTCFullYear

public Number getUTCFullYear()

Gets the 4-digit number representing the year according to Coordinated Universal Time (UTC).

Return:
Number - the 4-digit number representing the year according to Coordinated Universal Time (UTC)

getUTCHours

public Number getUTCHours()

Gets the hour of the day (e.g. a number, 0-23) according to Coordinated Universal Time (UTC).

Return:
Number - the hour of the day according to Coordinated Universal Time (UTC)

getUTCMilliseconds

public Number getUTCMilliseconds()

Gets the milliseconds division of the day (e.g. a number, 0-999) according to Coordinated Universal Time (UTC).

Return:
Number - the milliseconds division of the day according to Coordinated Universal Time (UTC)

getUTCMinutes

public Number getUTCMinutes()

Gets the minutes division of the day (e.g. a number, 0-59) according to Coordinated Universal Time (UTC).

Return:
Number - the minutes division of the day according to Coordinated Universal Time (UTC)

getUTCMonth

public Number getUTCMonth()

Gets the month of the year (e.g. a number, 0-11) represented by the number of months after January according to Coordinated Universal Time (UTC).

Return:
Number - the month of the year represented by the number of months after January, e.g. 0 = January, 1 = February, etc. according to Coordinated Universal Time (UTC)

getUTCSeconds

public Number getUTCSeconds()

Gets the seconds division of the day (e.g. a number, 0-59) according to Coordinated Universal Time (UTC).

Return:
Number - the seconds division of the day according to Coordinated Universal Time (UTC)

getYear

public Number getYear()

Gets the 2-, 3-, or maybe 4-digit number representing the year depending on the browser. This method is unreliable because some browsers will use a 4-digit number if the year is before 1900 or after 1999. Other browsers will return a value less than zero if the year is before 1900 or greater than 100 if greater than 2000.

Deprecated: use getFullYear() instead
Return:
Number - the 2-, 3-, or maybe 4-digit number representing the year depending on the browser

parse

public static Number parse(String dateString)

Gets the number of milliseconds since midnight of January 1st, 1970 Greenwich Mean Time (GMT) represented by dateString.

Parameters:
dateString  -  a String representing the date
Return:
Number - the number of milliseconds since midnight of January 1st, 1970 Greenwich Mean Time (GMT) represented by dateString

setDate

public Object setDate(Number dayOfTheMonth)

Sets the day of the month (e.g. a number, 1-31).

Parameters:
dayOfTheMonth  -  the day of the month
Return:
Object

setFullYear

public Object setFullYear(Number year)

Sets the 4-digit number representing the year.

Parameters:
year  -  the 4-digit number representing the year
Return:
Object

setHours

public Object setHours(Number hours)

Sets the hour of the day (e.g. a number, 0-23).

Parameters:
hours  -  the hour of the day
Return:
Object

setMilliseconds

public Object setMilliseconds(Number milliseconds)

Sets the milliseconds division of the day (e.g. a number, 0-999).

Parameters:
milliseconds  -  the milliseconds division of the day
Return:
Object

setMinutes

public Object setMinutes(Number minutes)

Sets the minutes division of the day (e.g. a number, 0-59).

Parameters:
minutes  -  the minutes division of the day
Return:
Object

setMonth

public Object setMonth(Number month)

Sets the month of the year (e.g. a number, 0-11) represented by the number of months after January.

Parameters:
month  -  the month of the year represented by the number of months after January, e.g. 0 = January, 1 = February, etc.
Return:
Object

setSeconds

public Object setSeconds(Number seconds)

Sets the seconds division of the day (e.g. a number, 0-59).

Parameters:
seconds  -  the seconds division of the day
Return:
Object

setTime

public Object setTime(Number milliseconds)

Sets the number of milliseconds since midnight of January 1st, 1970 Greenwich Mean Time (GMT).

Parameters:
milliseconds  -  the number of milliseconds since midnight of January 1st, 1970 Greenwich Mean Time (GMT)
Return:
Object

setUTCDate

public Object setUTCDate(Number dayOfTheMonth)

Sets the day of the month (e.g. a number, 1-31) according to Coordinated Universal Time (UTC).

Parameters:
dayOfTheMonth  -  the day of the month according to Coordinated Universal Time (UTC)
Return:
Object

setUTCFullYear

public Object setUTCFullYear(Number year)

Sets the 4-digit number representing the year according to Coordinated Universal Time (UTC).

Parameters:
year  -  the 4-digit number representing the year according to Coordinated Universal Time (UTC)
Return:
Object

setUTCHours

public Object setUTCHours(Number hours)

Sets the hour of the day (e.g. a number, 0-23) according to Coordinated Universal Time (UTC).

Parameters:
hours  -  the hour of the day according to Coordinated Universal Time (UTC)
Return:
Object

setUTCMilliseconds

public Object setUTCMilliseconds(Number milliseconds)

Sets the milliseconds division of the day (e.g. a number, 0-999) according to Coordinated Universal Time (UTC).

Parameters:
milliseconds  -  the milliseconds division of the day according to Coordinated Universal Time (UTC)
Return:
Object

setUTCMinutes

public Object setUTCMinutes(Number minutes)

Sets the minutes division of the day (e.g. a number, 0-59) according to Coordinated Universal Time (UTC).

Parameters:
minutes  -  the minutes division of the day according to Coordinated Universal Time (UTC)
Return:
Object

setUTCMonth

public Object setUTCMonth(Number month)

Sets the month of the year (e.g. a number, 0-11) represented by the number of months after January according to Coordinated Universal Time (UTC).

Parameters:
month  -  the month of the year represented by the number of months after January, e.g. 0 = January, 1 = February, etc. according to Coordinated Universal Time (UTC)
Return:
Object

setUTCSeconds

public Object setUTCSeconds(Number seconds)

Sets the seconds division of the day (e.g. a number, 0-59) according to Coordinated Universal Time (UTC).

Parameters:
seconds  -  the seconds division of the day according to Coordinated Universal Time (UTC)
Return:
Object

setYear

public Object setYear(Number year)

Sets the 2-, 3-, or maybe 4-digit number representing the year depending on the browser. This method is unreliable because some browsers will use a 4-digit number if the year is before 1900 or after 1999. Other browsers will use a value less than zero if the year is before 1900 or greater than 100 if greater than 2000.

Deprecated: use setFullYear(Number) instead
Parameters:
year  -  the 2-, 3-, or maybe 4-digit number representing the year depending on the browser
Return:
Object

toDateString

public String toDateString()

Gets a human-readable String representation of the date (non-time) portion of the Date.

Return:
String - a human-readable String representation of the date (non-time) portion of the Date

toGMTString

public String toGMTString()

Gets a human-readable String representation of the Date according to Greenwich Mean Time (GMT).

Deprecated: use toUTCString() instead
Return:
String - a human-readable String representation of the Date according to Greenwich Mean Time (GMT)

toLocaleDateString

public String toLocaleDateString()

Gets a human-readable String representation of the date (non-time) portion of the Date using a format indicated by the browser's Locale.

Return:
String - a human-readable String representation of the date (non-time) portion of the Date using a format indicated by the browser's Locale

toLocaleString

public String toLocaleString()

Gets a human-readable String representation of the Date using a format indicated by the browser's Locale.

Return:
String - a human-readable String representation of the Date using a format indicated by the browser's Locale

toLocaleTimeString

public String toLocaleTimeString()

Gets a human-readable String representation of the time (non-date) portion of the Date using a format indicated by the browser's Locale.

Return:
String - a human-readable String representation of the time (non-date) portion of the Date using a format indicated by the browser's Locale

toSource

public String toSource()

Gets a source code String representation of the Date.

Return:
String - a source code String representation of the Date

toString

public String toString()

Gets a human-readable String representation of the Date.

Return:
String - a human-readable String representation of the Date

toTimeString

public String toTimeString()

Gets a human-readable String representation of the time (non-date) portion of the Date.

Return:
String - a human-readable String representation of the time (non-date) portion of the Date

toUTCString

public String toUTCString()

Gets a human-readable String representation of the Date according to Coordinated Universal Time (UTC).

Deprecated: use toUTCString() instead
Return:
String - a human-readable String representation of the Date according to Coordinated Universal Time (UTC)

UTC

public static Number UTC(Number year,
                         Number month,
                         Number dayOfTheMonth,
                         Number hours,
                         Number minutes,
                         Number seconds,
                         Number milliseconds)

Gets the number of milliseconds between the specified point in time since midnight of January 1st, 1970 according to Coordinated Universal Time (UTC).

Parameters:
year  -  the 4-digit number representing the year according to Coordinated Universal Time (UTC)
month  -  the month of the year represented by the number of months after January, e.g. 0 = January, 1 = February, etc. according to Coordinated Universal Time (UTC)
dayOfTheMonth  -  the day of the month according to Coordinated Universal Time (UTC)
hours  -  the optional hours division of the day according to Coordinated Universal Time (UTC)
minutes  -  the optional minutes division of the day according to Coordinated Universal Time (UTC)
seconds  -  the optional seconds division of the day according to Coordinated Universal Time (UTC)
milliseconds  -  the optional milliseconds division of the day according to Coordinated Universal Time (UTC)
Return:
Number - the number of milliseconds between the specified point in time since midnight of January 1st, 1970 according to Coordinated Universal Time (UTC).

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

 

Generated on 2012.08.25 02:16 UTC
Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.