logo
pub struct Date(_);

Implementations

Check if the time (number of milliseconds) is in the expected range. Returns None if the time is not in the range, otherwise returns the time itself in option.

More information:

Converts the Date to a local DateTime.

If the Date is invalid (i.e. NAN), this function will return None.

Converts the Date to a UTC DateTime.

If the Date is invalid (i.e. NAN), this function will return None.

Optionally sets the individual components of the Date.

Each component does not have to be within the range of valid values. For example, if month is too large then year will be incremented by the required amount.

Date.prototype.getDate()

The getDate() method returns the day of the month for the specified date according to local time.

More information:

Date.prototype.getDay()

The getDay() method returns the day of the week for the specified date according to local time, where 0 represents Sunday.

More information:

Date.prototype.getFullYear()

The getFullYear() method returns the year of the specified date according to local time.

More information:

Date.prototype.getHours()

The getHours() method returns the hour for the specified date, according to local time.

More information:

Date.prototype.getMilliseconds()

The getMilliseconds() method returns the milliseconds in the specified date according to local time.

More information:

Date.prototype.getMinutes()

The getMinutes() method returns the minutes in the specified date according to local time.

More information:

Date.prototype.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).

More information:

Date.prototype.getSeconds()

The getSeconds() method returns the seconds in the specified date according to local time.

More information:

Date.prototype.getYear()

The getYear() method returns the year in the specified date according to local time. Because getYear() does not return full years (“year 2000 problem”), it is no longer used and has been replaced by the getFullYear() method.

More information:

Date.prototype.getTime()

The getTime() method returns the number of milliseconds since the Unix Epoch.

More information:

Date.prototype.getTimeZoneOffset()

The getTimezoneOffset() method returns the time zone difference, in minutes, from current locale (host system settings) to UTC.

More information:

Date.prototype.getUTCDate()

The getUTCDate() method returns the day (date) of the month in the specified date according to universal time.

More information:

Date.prototype.getUTCDay()

The getUTCDay() method returns the day of the week in the specified date according to universal time, where 0 represents Sunday.

More information:

Date.prototype.getUTCFullYear()

The getUTCFullYear() method returns the year in the specified date according to universal time.

More information:

Date.prototype.getUTCHours()

The getUTCHours() method returns the hours in the specified date according to universal time.

More information:

Date.prototype.getUTCMilliseconds()

The getUTCMilliseconds() method returns the milliseconds portion of the time object’s value.

More information:

Date.prototype.getUTCMinutes()

The getUTCMinutes() method returns the minutes in the specified date according to universal time.

More information:

Date.prototype.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).

More information:

Date.prototype.getUTCSeconds()

The getUTCSeconds() method returns the seconds in the specified date according to universal time.

More information:

Date.prototype.setDate()

The setDate() method sets the day of the Date object relative to the beginning of the currently set month.

More information:

Date.prototype.setFullYear()

The setFullYear() method sets the full year for a specified date according to local time. Returns new timestamp.

More information:

Date.prototype.setHours()

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.

More information:

Date.prototype.setMilliseconds()

The setMilliseconds() method sets the milliseconds for a specified date according to local time.

More information:

Date.prototype.setMinutes()

The setMinutes() method sets the minutes for a specified date according to local time.

More information:

Date.prototype.setMonth()

The setMonth() method sets the month for a specified date according to the currently set year.

More information:

Date.prototype.setSeconds()

The setSeconds() method sets the seconds for a specified date according to local time.

More information:

Date.prototype.setYear()

The setYear() method sets the year for a specified date according to local time.

More information:

Date.prototype.setTime()

The setTime() method sets the Date object to the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.

More information:

Date.prototype.setUTCDate()

The setUTCDate() method sets the day of the month for a specified date according to universal time.

More information:

Date.prototype.setFullYear()

The setFullYear() method sets the full year for a specified date according to local time. Returns new timestamp.

More information:

Date.prototype.setUTCHours()

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.

More information:

Date.prototype.setUTCMilliseconds()

The setUTCMilliseconds() method sets the milliseconds for a specified date according to universal time.

More information:

Date.prototype.setUTCMinutes()

The setUTCMinutes() method sets the minutes for a specified date according to universal time.

More information:

Date.prototype.setUTCMonth()

The setUTCMonth() method sets the month for a specified date according to universal time.

More information:

Date.prototype.setUTCSeconds()

The setUTCSeconds() method sets the seconds for a specified date according to universal time.

More information:

Date.prototype.toDateString()

The toDateString() method returns the date portion of a Date object in English.

More information:

Date.prototype.toGMTString()

The toGMTString() method converts a date to a string, using Internet Greenwich Mean Time (GMT) conventions.

More information:

Date.prototype.toISOString()

The toISOString() method returns a string in simplified extended ISO format (ISO 8601).

More information:

Date.prototype.toJSON()

The toJSON() method returns a string representation of the Date object.

More information:

Date.prototype.toString()

The toString() method returns a string representing the specified Date object.

More information:

Date.prototype.toTimeString()

The toTimeString() method returns the time portion of a Date object in human readable form in American English.

More information:

Date.prototype.toUTCString()

The toUTCString() method returns a string representing the specified Date object.

More information:

Date.prototype.valueOf()

The valueOf() method returns the primitive value of a Date object.

More information:

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Marks all contained Gcs.
Increments the root-count of all contained Gcs.
Decrements the root-count of all contained Gcs.
Runs Finalize::finalize() on this object and all contained subobjects Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Convert the Rust type which implements NativeObject to a &dyn Any.
Convert the Rust type which implements NativeObject to a &mut dyn Any.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.