Time Class

This class represents all the functionality concerning time.

Definition

Namespace: Firefly.Box
Assembly: Firefly.Box (in Firefly.Box.dll) Version: debug-master-v:33791
C#
public class Time : DataTypeBase, IComparable
Inheritance
Object    DataTypeBase    Time
Implements
IComparable

Remarks

The time is stored as the total seconds from 00:00:00

Constructors

TimeInitializes a new instance of the Time class.
Time(Int32, Int32, Int32) Creates a Time based on the hours, minutes and seconds

Properties

HourGets the value determining the Time's hour
MinuteGets the value determining the Time's minute
Now Return the current time
SecondGets the value determining the Time's second
StartOfDay Represents the hour 00:00:00
TotalSeconds Get's the total seconds from 00:00:00 and this Time

Methods

AddHours Add the specified hours to the Time
AddMinutes Add the specified minutes to the Time
AddSeconds Add the specified seconds to the Time
AddToDateTime 
CastCasts the object specified in the basedOn parameter to a Time. If the cast fails an InvalidCastException is thrown
CompareToCompares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
(Overrides DataTypeBaseCompareTo(Object))
EqualsDetermines whether the specified Object is equal to the current Object.
(Overrides ObjectEquals(Object))
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
FromDateTime Extracts the Time from a DateTime.
GetHashCodeServes as a hash function for a particular type.
(Overrides ObjectGetHashCode)
GetTypeGets the Type of the current instance.
(Inherited from Object)
IsNullOrStartOfDay 
IsSpecialNullInstance 
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ParseParses text and returns the parsed value as Time
ToStringReturns a String that represents the current Time.
(Overrides ObjectToString)
ToString(String)Returns a String that represents the current Time. The result string is formatted using the format provided in the format parameter.
(Overrides DataTypeBaseToString(String))
ToString(String, IFormatProvider)Returns a String that represents the value specified in format. The result string is formatted using the format provided in the format parameter.
(Inherited from DataTypeBase)
ToString(Time, String)Returns a String that represents the value specified in time. The result string is formatted using the format provided in the format parameter.
TryCast 

Operators

See Also