Date Class

This class represents all the functionality concerning dates.

Definition

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

Remarks

The Date value type represents dates with values ranging from January 1, 0001 Anno Domini (Common Era) through December 31, 9999 A.D. (C.E.) A date could also accept null values, and the Empty value.
Arithmatic operations can be done on dates, to add or subtract days to them. Subtracting one date from another, will return the number of days in between.

Constructors

DateInitializes a new instance of the Date class.
Date(Int32, Int32, Int32) Creates a Date based on the year, month and day

Properties

BeginningOfMonth Returns a Date representing the first day of the month of the Date
BeginningOfYear Returns a Date representing the first day of the year of the Date
ContextDefaultFormat 
DateSeperator 
DateTimeFormatInfo 
Day Gets the day of the month represented by this instance.
DayOfWeek 
Empty Represents an empty Date
EnableJapaneseEraInFormat 
EndOfMonth Returns a Date representing the last day of the month of the Date
EndOfYear Returns a Date representing the last day of the year of the Date
Month Gets the month component of the date represented by this instance.
Now Return the current date
SharedDefaultFormat 
TwoDigitYearMax 
Year Gets the year component of the date represented by this instance.

Methods

AddDays Add the specified days to the Date
AddMonths Add the specified months to the Date
AddYears Add the specified years to the Date
CastCasts the object specified in the o parameter to a Date. 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 Converts a DateTime to a Date.
GetHashCodeServes as a hash function for a particular type.
(Overrides ObjectGetHashCode)
GetTypeGets the Type of the current instance.
(Inherited from Object)
IsNullOrEmpty 
IsSpecialNullInstance 
Log 
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Parse(String, String)Parses text and returns the parsed value as Date
Parse(String, String, Boolean)Parses text and returns the parsed value as Date
ToDateTime Converts a Date to DateTime
ToStringReturns a String that represents the current Date.
(Overrides ObjectToString)
ToString(String)Returns a String that represents the current Date. The result string is formatted using the format provided in the format parameter.
(Overrides DataTypeBaseToString(String))
ToString(Date, String)Returns a String that represents the value specified in date. The result string is formatted using the format provided in the format parameter.
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)
TryCastTries to cast the object specified in the o parameter to a Boolean.

Operators

See Also