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]

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

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

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)

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

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)

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

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)

[src]

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)

[src]

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)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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)

[src]

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

(JavaScript docs)

[src]

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)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

Trait Implementations

impl Clone for Date
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Date
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for Date
[src]

[src]

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

[src]

This method tests for !=.

impl Eq for Date
[src]

impl InstanceOf for Date
[src]

[src]

Checks whenever a given Reference if of type Self.

impl AsRef<Reference> for Date
[src]

[src]

Performs the conversion.

impl ReferenceType for Date
[src]

[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]

[src]

Performs the conversion.

impl TryFrom<Date> for Reference
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl TryFrom<Reference> for Date
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

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

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl TryFrom<Value> for Date
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

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

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl JsSerialize for Date
[src]

Auto Trait Implementations

impl Send for Date

impl Sync for Date