Struct stdweb::web::Date[][src]

pub struct Date(_);

(JavaScript docs) https://www.ecma-international.org/ecma-262/6.0/#sec-date-constructor

Methods

impl Date
[src]

Creates a JavaScript Date instance that represents a single moment in time. Date objects are based on a time value that is the number of milliseconds since 1 January 1970 UTC.

(JavaScript docs)

Creates a JavaScript Date instance that represents a single moment in time. Date objects are based on a time value that is the number of milliseconds since 1 January 1970 UTC.

year is an integer value representing the year. Values from 0 to 99 map to the years 1900 to 1999. month is an integer value representing the month, beginning with 0 for January to 11 for December day is an integer value representing the day of the month (normally from 1 to 31) hours an integer value representing the minute segment of a time seconds an integer value representing the second segment of a time milliseconds an integer value representing the millisecond segment of a time

(JavaScript docs)

Creates a JavaScript Date instance that represents a single moment in time. Date objects are based on a time value that is the number of milliseconds since 1 January 1970 UTC.

String value representing a date. The string should be in a format recognized by the Date.parse() method (IETF-compliant RFC 2822 timestamps and also a version of ISO8601).

(JavaScript docs)

Creates a JavaScript Date instance that represents a single moment in time. Date objects are based on a time value that is the number of milliseconds since 1 January 1970 UTC.

Integer value representing the number of milliseconds since January 1, 1970, 00:00:00 UTC, with leap seconds ignored (Unix Epoch; but consider that most Unix timestamp functions count in seconds).

(JavaScript docs)

The Date.UTC() method accepts the same parameters as the longest form of the constructor, and returns the number of milliseconds in a Date object since January 1, 1970, 00:00:00, universal time.

(JavaScript docs)

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. 2015-02-31).

(JavaScript docs)

The Date.now() method returns the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

The getTime() method returns the numeric value corresponding to the time for the specified date according to universal time.

getTime() always uses UTC for time representation. For example, a client browser in one timezone, getTime() will be the same as a client browser in any other timezone.

You can use this method to help assign a date and time to another Date object. This method is functionally equivalent to the valueOf() method.

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

The getUTCMilliseconds() method returns the milliseconds in the specified date according to universal time.

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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.

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

The setUTCFullYear() method sets the full year for a specified date according to universal time.

(JavaScript docs)

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.

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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). The timezone is always zero UTC offset, as denoted by the suffix "Z".

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

The toUTCString() method converts a date to a string, using the UTC time zone.

(JavaScript docs)

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

(JavaScript docs)

Trait Implementations

impl Clone for Date
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Date
[src]

Formats the value using the given formatter. Read more

impl PartialEq for Date
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Date
[src]

impl InstanceOf for Date
[src]

Checks whenever a given Reference if of type Self.

impl AsRef<Reference> for Date
[src]

Performs the conversion.

impl ReferenceType for Date
[src]

Converts a given reference into a concrete reference-like wrapper. Doesn't do any type checking; highly unsafe to use! Read more

impl From<Date> for Reference
[src]

Performs the conversion.

impl TryFrom<Date> for Reference
[src]

The type returned in the event of a conversion error.

Performs the conversion.

impl TryFrom<Reference> for Date
[src]

The type returned in the event of a conversion error.

Performs the conversion.

impl<'_r> TryFrom<&'_r Reference> for Date
[src]

The type returned in the event of a conversion error.

Performs the conversion.

impl TryFrom<Value> for Date
[src]

The type returned in the event of a conversion error.

Performs the conversion.

impl<'_r> TryFrom<&'_r Value> for Date
[src]

The type returned in the event of a conversion error.

Performs the conversion.

impl JsSerialize for Date
[src]

Auto Trait Implementations

impl Send for Date

impl Sync for Date