W3cubDocs

/Haxe C#

DateTime

package cs.system

extends ValueType

implements IComparable_1<DateTime>, IEquatable_1<DateTime>, IComparable, IConvertible, IFormattable, ISerializable

@:struct@:final@:libType@:csNative@:native("System.DateTime") Available on cs

Constructor

@:final @:overload new (ticks:Int64)

@:final @:overload new (year:Int, month:Int, day:Int, hour:Int, minute:Int, second:Int, millisecond:Int, calendar:Calendar, kind:DateTimeKind)

@:final @:overload new (year:Int, month:Int, day:Int, hour:Int, minute:Int, second:Int, millisecond:Int, kind:DateTimeKind)

@:final @:overload new (year:Int, month:Int, day:Int, hour:Int, minute:Int, second:Int, kind:DateTimeKind)

@:final @:overload new (ticks:Int64, kind:DateTimeKind)

@:final @:overload new (year:Int, month:Int, day:Int, hour:Int, minute:Int, second:Int, millisecond:Int, calendar:Calendar)

@:final @:overload new (year:Int, month:Int, day:Int, hour:Int, minute:Int, second:Int, calendar:Calendar)

@:final @:overload new (year:Int, month:Int, day:Int, calendar:Calendar)

@:final @:overload new (year:Int, month:Int, day:Int, hour:Int, minute:Int, second:Int, millisecond:Int)

@:final @:overload new (year:Int, month:Int, day:Int, hour:Int, minute:Int, second:Int)

@:final @:overload new (year:Int, month:Int, day:Int)

Variables

read only Date:DateTime

read only Day:Int

read only DayOfWeek:DayOfWeek

read only DayOfYear:Int

read only Hour:Int

read only Kind:DateTimeKind

read only Millisecond:Int

read only Minute:Int

read only Month:Int

read only Second:Int

read only Ticks:Int64

read only TimeOfDay:TimeSpan

read only Year:Int

Methods

@:final @:overload Add (value:TimeSpan):DateTime

@:final @:overload AddDays (value:Float):DateTime

@:final @:overload AddHours (value:Float):DateTime

@:final @:overload AddMilliseconds (value:Float):DateTime

@:final @:overload AddMinutes (value:Float):DateTime

@:final @:overload AddMonths (months:Int):DateTime

@:final @:overload AddSeconds (value:Float):DateTime

@:final @:overload AddTicks (value:Int64):DateTime

@:final @:overload AddYears (value:Int):DateTime

@:final @:overload CompareTo (value:Dynamic):Int

@:final @:overload CompareTo (value:DateTime):Int

@:final @:overload GetDateTimeFormats ():NativeArray<String>

@:final @:overload GetDateTimeFormats (format:Char16, provider:IFormatProvider):NativeArray<String>

@:final @:overload GetDateTimeFormats (provider:IFormatProvider):NativeArray<String>

@:final @:overload GetDateTimeFormats (format:Char16):NativeArray<String>

@:final @:overload GetTypeCode ():TypeCode

@:final @:overload IsDaylightSavingTime ():Bool

@:final @:overload Subtract (value:DateTime):TimeSpan

@:final @:overload Subtract (value:TimeSpan):DateTime

@:final @:overload ToBinary ():Int64

@:final @:overload ToFileTime ():Int64

@:final @:overload ToFileTimeUtc ():Int64

@:final @:overload ToLocalTime ():DateTime

@:final @:overload ToLongDateString ():String

@:final @:overload ToLongTimeString ():String

@:final @:overload ToOADate ():Float

@:final @:overload ToShortDateString ():String

@:final @:overload ToShortTimeString ():String

@:final @:overload ToUniversalTime ():DateTime

Static variables

@:readOnly static read only MaxValue:DateTime

@:readOnly static read only MinValue:DateTime

static read only Now:DateTime

static read only Today:DateTime

static read only UtcNow:DateTime

Static methods

@:final @:overload static Compare (t1:DateTime, t2:DateTime):Int

@:final @:overload static DaysInMonth (year:Int, month:Int):Int

@:final @:overload static FromBinary (dateData:Int64):DateTime

@:final @:overload static FromFileTime (fileTime:Int64):DateTime

@:final @:overload static FromFileTimeUtc (fileTime:Int64):DateTime

@:final @:overload static FromOADate (d:Float):DateTime

@:final @:overload static IsLeapYear (year:Int):Bool

@:final @:overload static Parse (s:String):DateTime

@:final @:overload static Parse (s:String, provider:IFormatProvider, styles:DateTimeStyles):DateTime

@:final @:overload static Parse (s:String, provider:IFormatProvider):DateTime

@:final @:overload static ParseExact (s:String, format:String, provider:IFormatProvider):DateTime

@:final @:overload static ParseExact (s:String, formats:NativeArray<String>, provider:IFormatProvider, style:DateTimeStyles):DateTime

@:final @:overload static ParseExact (s:String, format:String, provider:IFormatProvider, style:DateTimeStyles):DateTime

@:final @:overload static SpecifyKind (value:DateTime, kind:DateTimeKind):DateTime

@:final @:overload static TryParse (s:String, result:Out<DateTime>):Bool

@:final @:overload static TryParse (s:String, provider:IFormatProvider, styles:DateTimeStyles, result:Out<DateTime>):Bool

@:final @:overload static TryParseExact (s:String, format:String, provider:IFormatProvider, style:DateTimeStyles, result:Out<DateTime>):Bool

@:final @:overload static TryParseExact (s:String, formats:NativeArray<String>, provider:IFormatProvider, style:DateTimeStyles, result:Out<DateTime>):Bool

@:native("Equals") @:final @:overload static _Equals (t1:DateTime, t2:DateTime):Bool

@:final @:overload static op_Addition (d:DateTime, t:TimeSpan):DateTime

@:final @:overload static op_Equality (d1:DateTime, d2:DateTime):Bool

@:final @:overload static op_GreaterThan (t1:DateTime, t2:DateTime):Bool

@:final @:overload static op_GreaterThanOrEqual (t1:DateTime, t2:DateTime):Bool

@:final @:overload static op_Inequality (d1:DateTime, d2:DateTime):Bool

@:final @:overload static op_LessThan (t1:DateTime, t2:DateTime):Bool

@:final @:overload static op_LessThanOrEqual (t1:DateTime, t2:DateTime):Bool

@:final @:overload static op_Subtraction (d1:DateTime, d2:DateTime):TimeSpan

@:final @:overload static op_Subtraction (d:DateTime, t:TimeSpan):DateTime

© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/cs/system/DateTime.html