Interface Date

Provides extensions to the base ECMAScript (JavaScript) Date object. Date Type Extensions

see

{@link http://msdn.microsoft.com/en-us/library/bb310850(v=vs.100).aspx}

Index

Methods

Methods

public format(value: string): string

Formats a date by using the invariant (culture-independent) culture.

Parameters

  • value: string

Returns

string

public localeFormat(value: string): string

Formats a date by using the current culture. This function is static and can be invoked without creating an instance of the object.

Parameters

  • value: string

Returns

string

public parseInvariant(value: string): string

Creates a date from a string by using the invariant culture. This function is static and can be invoked without creating an instance of the object.

Parameters

  • value: string
          A locale-specific string that represents a date.
    

Returns

string

If value is a valid string representation of a date in the invariant format, an object of type Date; otherwise, null.

public parseInvariant(value: string, formats?: Array<string>): string

Parameters

  • value: string
  • formats?: Array<string> optional

Returns

string

public parseInvariant(value: string, formats?: Array<string>): string

Parameters

  • value: string
  • formats?: Array<string> optional

Returns

string

public parseLocale(value: string): string

Creates a date from a locale-specific string by using the current culture. This function is static and can be invoked without creating an instance of the object.

exception

(Debug) formats contains an invalid format.

Parameters

  • value: string
          A locale-specific string that represents a date.
    

Returns

string

public parseLocale(value: string, formats?: Array<string>): string

Parameters

  • value: string
  • formats?: Array<string> optional

Returns

string

public parseLocale(value: string, formats?: Array<string>): string

Parameters

  • value: string
  • formats?: Array<string> optional

Returns

string