FdcTime class

Time-of-day value used by FdcDataSet time fields.

The value is date-less, timezone-less, immutable and comparable. Internally it stores 100ns ticks since midnight, matching SQL Server time(7) scale.

Implemented types

Constructors

FdcTime({required int hour, int minute = 0, int second = 0, int millisecond = 0, int microsecond = 0, int tick100ns = 0})
Creates a FdcTime.
factory
FdcTime.fromDateTime(DateTime value)
Creates a FdcTime.
factory
FdcTime.fromTicksSinceMidnight(int ticksSinceMidnight)
Creates a FdcTime.
factory

Properties

fractionTicks int
Returns the current fraction ticks.
no setter
hashCode int
The hash code for this object.
no setteroverride
hour int
Returns the current hour.
no setter
microsecond int
Returns the current microsecond.
no setter
millisecond int
Returns the current millisecond.
no setter
minute int
Returns the current minute.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
second int
Returns the current second.
no setter
tick100ns int
Returns the current tick100ns.
no setter
ticksSinceMidnight int
100ns ticks since midnight. Range: 0..863999999999.
final

Methods

compareTo(FdcTime other) int
Compares this object to another object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
roundedToScale(int scale) FdcTime
Returns this time rounded to fractional-second scale precision.
toSqlString({int scale = 7}) String
Formats this value as a SQL-compatible time literal with scale precision.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

parse(String text) FdcTime
Parses HH:mm, HH:mm:ss, or HH:mm:ss.fffffff.
tryParse(String text) FdcTime?
Parses a time-of-day string, returning null when the text is invalid.

Constants

ticksPerDay → const int
Default value for ticks per day.
ticksPerHour → const int
Default value for ticks per hour.
ticksPerMicrosecond → const int
Default value for ticks per microsecond.
ticksPerMillisecond → const int
Default value for ticks per millisecond.
ticksPerMinute → const int
Default value for ticks per minute.
ticksPerSecond → const int
Default value for ticks per second.