C# Class System.Date

Represents the ECMA Date object.
Afficher le fichier Open project: vannatech/blade Class Usage Examples

Méthodes publiques

Méthode Description
Date ( )

Initializes a new instance of the Date class.

Date ( int year, int month, int date, int hours, int minutes, int seconds, int milliseconds )

Initializes a new instance of the Date class.

Date ( long milliseconds )

Initializes a new instance of the Date class.

Date ( string dateString )

Initializes a new instance of the Date class.

UTC ( ) : int

Gets the number of milliseconds in a date string sine Jan 1, 1970, in universal time.

getDate ( ) : int

Get the day of the month.

getDay ( ) : int

Gets the day of the week.

getFullYear ( ) : int

Gets the full year.

getHours ( ) : int

Gets the hour.

getMilliseconds ( ) : int

Gets the milliseconds.

getMinutes ( ) : int

Gets the minutes.

getMonth ( ) : int

Gets the month.

getSeconds ( ) : int

Gets the seconds.

getTime ( ) : int

Get the number of milliseconds since Jan 1, 1970.

getTimezoneOffset ( ) : int

Gets the time difference between GMT and local time, in minutes.

getUTCDate ( ) : int

Gets the day of the month, in universal time.

getUTCDay ( ) : int

Gets the day of the week, in universal time.

getUTCFullYear ( ) : int

Gets the year, in universal time.

getUTCHours ( ) : int

Gets the hour, in universal time.

getUTCMilliseconds ( ) : int

Gets the milliseconds, in universal time.

getUTCMinutes ( ) : int

Gets the minutes, in universal time.

getUTCMonth ( ) : int

Gets the month, in universal time.

getUTCSeconds ( ) : int

Gets the seconds, in universal time.

now ( ) : int

Gets the current date and time as an offset in milliseconds since Jan 1, 1970.

parse ( string dateString ) : int

A string representing a date.

setDate ( int date ) : void

Sets the day of the month, from 1-31.

setFullYear ( int year ) : void

Sets the four digit year.

setHours ( int hour ) : void

Sets the hour, from 0-23.

setMilliseconds ( int milliseconds ) : void

Sets the milliseconds, from 0-999.

setMinutes ( int minute ) : void

Set the minutes, from 0-59.

setMonth ( int month ) : void

Sets the month, from 0-11.

setSeconds ( int second ) : void

Sets the seconds, from 0-59.

setTime ( int millisecond ) : void

Sets the time as an offset in milliseconds from Jan 1, 1970.

setUTCDate ( int month ) : void

Sets the day of the month, in universal time, from 1-31.

setUTCFullYear ( int year ) : void

Set the four digit year, in universal time.

setUTCHours ( int hour ) : void

Sets the hour, in universal time, from 0-23.

setUTCMilliseconds ( int millisecond ) : void

Sets the milliseconds, in universal time, from 0-999.

setUTCMinutes ( int minute ) : void

Set the minutes, in universal time, from 0-59.

setUTCMonth ( int month ) : void

Sets the month, in universal time, from 0-11.

setUTCSeconds ( int second ) : void

Set the seconds, in universal time, from 0-59.

toDateString ( ) : string

Gets the date portion of a date object as a string.

toLocaleDateString ( ) : string

Gets the date portion of a date object as a string, using locale conventions.

toLocaleTimeString ( ) : string

Gets the time portion of a date object as a string, using locale conventions.

toTimeString ( ) : string

Gets the time portion of a date object as a string.

toUTCString ( ) : string

Gets a date string, in universal time.

Method Details

Date() public méthode

Initializes a new instance of the Date class.
public Date ( )

Date() public méthode

Initializes a new instance of the Date class.
public Date ( int year, int month, int date, int hours, int minutes, int seconds, int milliseconds )
year int The year.
month int The month.
date int The date.
hours int The hours.
minutes int The minutes.
seconds int The seconds.
milliseconds int The milliseconds.

Date() public méthode

Initializes a new instance of the Date class.
public Date ( long milliseconds )
milliseconds long The milliseconds.

Date() public méthode

Initializes a new instance of the Date class.
public Date ( string dateString )
dateString string The date string.

UTC() public static méthode

Gets the number of milliseconds in a date string sine Jan 1, 1970, in universal time.
public static UTC ( ) : int
Résultat int

getDate() public méthode

Get the day of the month.
public getDate ( ) : int
Résultat int

getDay() public méthode

Gets the day of the week.
public getDay ( ) : int
Résultat int

getFullYear() public méthode

Gets the full year.
public getFullYear ( ) : int
Résultat int

getHours() public méthode

Gets the hour.
public getHours ( ) : int
Résultat int

getMilliseconds() public méthode

Gets the milliseconds.
public getMilliseconds ( ) : int
Résultat int

getMinutes() public méthode

Gets the minutes.
public getMinutes ( ) : int
Résultat int

getMonth() public méthode

Gets the month.
public getMonth ( ) : int
Résultat int

getSeconds() public méthode

Gets the seconds.
public getSeconds ( ) : int
Résultat int

getTime() public méthode

Get the number of milliseconds since Jan 1, 1970.
public getTime ( ) : int
Résultat int

getTimezoneOffset() public méthode

Gets the time difference between GMT and local time, in minutes.
public getTimezoneOffset ( ) : int
Résultat int

getUTCDate() public méthode

Gets the day of the month, in universal time.
public getUTCDate ( ) : int
Résultat int

getUTCDay() public méthode

Gets the day of the week, in universal time.
public getUTCDay ( ) : int
Résultat int

getUTCFullYear() public méthode

Gets the year, in universal time.
public getUTCFullYear ( ) : int
Résultat int

getUTCHours() public méthode

Gets the hour, in universal time.
public getUTCHours ( ) : int
Résultat int

getUTCMilliseconds() public méthode

Gets the milliseconds, in universal time.
public getUTCMilliseconds ( ) : int
Résultat int

getUTCMinutes() public méthode

Gets the minutes, in universal time.
public getUTCMinutes ( ) : int
Résultat int

getUTCMonth() public méthode

Gets the month, in universal time.
public getUTCMonth ( ) : int
Résultat int

getUTCSeconds() public méthode

Gets the seconds, in universal time.
public getUTCSeconds ( ) : int
Résultat int

now() public static méthode

Gets the current date and time as an offset in milliseconds since Jan 1, 1970.
public static now ( ) : int
Résultat int

parse() public static méthode

A string representing a date.
public static parse ( string dateString ) : int
dateString string
Résultat int

setDate() public méthode

Sets the day of the month, from 1-31.
public setDate ( int date ) : void
date int The date value.
Résultat void

setFullYear() public méthode

Sets the four digit year.
public setFullYear ( int year ) : void
year int The year value.
Résultat void

setHours() public méthode

Sets the hour, from 0-23.
public setHours ( int hour ) : void
hour int The hour value.
Résultat void

setMilliseconds() public méthode

Sets the milliseconds, from 0-999.
public setMilliseconds ( int milliseconds ) : void
milliseconds int The millisecond value.
Résultat void

setMinutes() public méthode

Set the minutes, from 0-59.
public setMinutes ( int minute ) : void
minute int The minute value.
Résultat void

setMonth() public méthode

Sets the month, from 0-11.
public setMonth ( int month ) : void
month int The month value.
Résultat void

setSeconds() public méthode

Sets the seconds, from 0-59.
public setSeconds ( int second ) : void
second int The second value.
Résultat void

setTime() public méthode

Sets the time as an offset in milliseconds from Jan 1, 1970.
public setTime ( int millisecond ) : void
millisecond int The millisecond value.
Résultat void

setUTCDate() public méthode

Sets the day of the month, in universal time, from 1-31.
public setUTCDate ( int month ) : void
month int The month value.
Résultat void

setUTCFullYear() public méthode

Set the four digit year, in universal time.
public setUTCFullYear ( int year ) : void
year int The year value.
Résultat void

setUTCHours() public méthode

Sets the hour, in universal time, from 0-23.
public setUTCHours ( int hour ) : void
hour int The hour value.
Résultat void

setUTCMilliseconds() public méthode

Sets the milliseconds, in universal time, from 0-999.
public setUTCMilliseconds ( int millisecond ) : void
millisecond int The millisecond value.
Résultat void

setUTCMinutes() public méthode

Set the minutes, in universal time, from 0-59.
public setUTCMinutes ( int minute ) : void
minute int The minute value.
Résultat void

setUTCMonth() public méthode

Sets the month, in universal time, from 0-11.
public setUTCMonth ( int month ) : void
month int The month value.
Résultat void

setUTCSeconds() public méthode

Set the seconds, in universal time, from 0-59.
public setUTCSeconds ( int second ) : void
second int The second value.
Résultat void

toDateString() public méthode

Gets the date portion of a date object as a string.
public toDateString ( ) : string
Résultat string

toLocaleDateString() public méthode

Gets the date portion of a date object as a string, using locale conventions.
public toLocaleDateString ( ) : string
Résultat string

toLocaleTimeString() public méthode

Gets the time portion of a date object as a string, using locale conventions.
public toLocaleTimeString ( ) : string
Résultat string

toTimeString() public méthode

Gets the time portion of a date object as a string.
public toTimeString ( ) : string
Résultat string

toUTCString() public méthode

Gets a date string, in universal time.
public toUTCString ( ) : string
Résultat string