C# Class Jurassic.Library.DateConstructor

Represents the built-in javascript Date object.
Inheritance: ClrStubFunction
Mostrar archivo Open project: paulbartrum/jurassic Class Usage Examples

Public Methods

Method Description
Construct ( ) : DateInstance

Creates a new Date object and sets its value to the current time.

Construct ( double milliseconds ) : DateInstance

Creates a new Date object from a millisecond value.

Construct ( int year, int month, int day = 1, int hour, int minute, int second, int millisecond ) : DateInstance

Creates a new Date object from various date components, expressed in local time.

If any of the parameters are out of range, then the other values are modified accordingly.

Construct ( string dateStr ) : DateInstance

Creates a new Date object from a string.

Private Methods

Method Description
Call ( ) : string
DateConstructor ( ObjectInstance prototype ) : System

Creates a new Date object.

GetDeclarativeProperties ( ScriptEngine engine ) : List
Now ( ) : double
Parse ( string dateStr ) : double
UTC ( int year, int month, int day = 1, int hour, int minute, int second, int millisecond ) : double
__STUB__Call ( ScriptEngine engine, object thisObj, object args ) : object
__STUB__Construct ( ScriptEngine engine, object thisObj, object args ) : ObjectInstance
__STUB__Now ( ScriptEngine engine, object thisObj, object args ) : object
__STUB__Parse ( ScriptEngine engine, object thisObj, object args ) : object
__STUB__UTC ( ScriptEngine engine, object thisObj, object args ) : object

Method Details

Construct() public method

Creates a new Date object and sets its value to the current time.
public Construct ( ) : DateInstance
return DateInstance

Construct() public method

Creates a new Date object from a millisecond value.
public Construct ( double milliseconds ) : DateInstance
milliseconds double The number of milliseconds since 1 January 1970 00:00:00 UTC.
return DateInstance

Construct() public method

Creates a new Date object from various date components, expressed in local time.
If any of the parameters are out of range, then the other values are modified accordingly.
public Construct ( int year, int month, int day = 1, int hour, int minute, int second, int millisecond ) : DateInstance
year int The full year.
month int The month as an integer between 0 and 11 (january to december).
day int The day of the month, from 1 to 31. Defaults to 1.
hour int The number of hours since midnight, from 0 to 23. Defaults to 0.
minute int The number of minutes, from 0 to 59. Defaults to 0.
second int The number of seconds, from 0 to 59. Defaults to 0.
millisecond int The number of milliseconds, from 0 to 999. Defaults to 0.
return DateInstance

Construct() public method

Creates a new Date object from a string.
public Construct ( string dateStr ) : DateInstance
dateStr string A string representing a date, expressed in RFC 1123 format.
return DateInstance