More actions
No edit summary |
Nguyenduyan (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{CGscriptClass_Template |Name= | {{CGscriptClass_Template | ||
{{CGscriptParameters_Template|Type=string|Name= | |Name=DateTime | ||
|Description= | |Description=The DateTime object | ||
|Constructors= | |||
{{CGscriptConstructors_Template|Parameters= | |||
{{CGscriptParameters_Template|Type=string|Name=value|Description=Value to parse as a date, syntax is same as for constant values}} | |||
|Description=New based on a string representation of a date}} | |||
{{CGscriptConstructors_Template|Parameters= | |||
{{CGscriptParameters_Template|Type=array|Name=value|Description=Value to parse as a date}} | |||
|Description=New based on a array representation of a date}} | |||
|Methods= | |||
{{CGscriptMethods_Template|ReturnType=string|Name=ToString|Description=The string representation of the object.}} | |||
|Properties= | |||
{{CGscriptProperties_Template|ReturnType=array|Name=AsArray|HasGetter=1|Description=Return value as the array representation of a date}} | |||
{{CGscriptProperties_Template|ReturnType=string|Name=ObjectTypeName|HasGetter=1|Description=The name of the type of object.}} | |||
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}} | |||
}} | |||
==== <span style="color:#a52a2a">'''Examples'''</span> ==== | |||
<source lang="javascript"> | <source lang="javascript"> | ||
DateTime dt = new DateTime("2009/04/05"); | DateTime dt = new DateTime("2009/04/05"); | ||
print(dt.ToString()); | print(dt.ToString()); | ||
</source> | </source> |
Revision as of 06:52, 14 February 2017
DateTime
The DateTime object
Constructors
- (string value "Value to parse as a date, syntax is same as for constant values") - New based on a string representation of a date
- (array value "Value to parse as a date") - New based on a array representation of a date
Methods
- string ToString() - The string representation of the object.
Properties
- array AsArray { get; } - Return value as the array representation of a date
- string ObjectTypeName { get; } - The name of the type of object.
- TypeInformation TypeInformation { get; } - Get information about this class.
Examples
DateTime dt = new DateTime("2009/04/05");
print(dt.ToString());