Version

SmartDate Class Members

The following tables list the members exposed by SmartDate.

Public Constructors
 NameDescription
Public ConstructorSmartDate ConstructorOverloaded.   
Public Fields
 NameDescription
Public Fieldstatic (Shared in Visual Basic)EmptyStatic property representing the empty SmartDate.  
Public Fieldstatic (Shared in Visual Basic)MaxValueRepresents the largest possible value of a SmartDate.  
Public Fieldstatic (Shared in Visual Basic)MinValueRepresents the smallest possible value of a SmartDate.  
Public Properties
 NameDescription
Public PropertyDateGets the day constituent for the current DateTime value absent any time information (i.e., as if at Midnight).  
Public PropertyDayGets the day of the month (between 1 and 31) for the current DateTime value.  
Public PropertyDayOfWeekGets the day of the week represented for the current DateTime value.  
Public PropertyDayOfYearGets the calendar day of the year (between 1 and 366) for the current DateTime value.  
Public PropertyDBValueGets a database-friendly version of the date value.  
Public PropertyFormatStringGets or sets the format string used to format a date value when it is returned as text.  
Public PropertyHourGets the hour constituent (between 0 and 23) of the current DateTime value.  
Public PropertyIsEmptyIndicates whether this SmartDate instance contains an empty date.  
Public PropertyMillisecondGets the milliseconds constituent (between 0 and 999) of the current DateTime value.  
Public PropertyMinuteGets the minutes constituent (between 0 and 59) of the current DateTime value.  
Public PropertyMonthGets the months constituent (between 1 and 12) of the current DateTime value.  
Public Propertystatic (Shared in Visual Basic)NowGets the SmartDate that is in the current local date and approximate time (to the best possible resolution of the system timer) on this machine.  
Public PropertySecondGets the seconds constituent (between 0 and 59) of the current DateTime value.  
Public PropertyTextGets or sets the date value.  
Public PropertyTicksGets the count of clock ticks representing the current DateTime value.  
Public PropertyTimeOfDayGets the time-of-day constituent for the current DateTime value.  
Public Propertystatic (Shared in Visual Basic)TodayGets the SmartDate that is in the current date on this machine at midnight, local time.  
Public Propertystatic (Shared in Visual Basic)UtcNowGets the SmartDate that is in the current universal time (UTC) date and approximate time (to the best possible resolution of the system timer) on this machine.  
Public PropertyValueGets or sets the date value as a .NET DateTime.  
Public PropertyYearGets the year constituent (between 1 and 9999) of the current DateTime value.  
Public Methods
 NameDescription
Public MethodAddAdds a TimeSpan onto the current SmartDate instance if it is non-empty.  
Public MethodAddDaysAdds the requested number of days to the current DateTime value.  
Public MethodAddHoursAdds the requested number of hours to the current DateTime value.  
Public MethodAddMillisecondsAdds the requested number of milliseconds to the current DateTime value.  
Public MethodAddMinutesAdds the requested number of minutes to the current DateTime value.  
Public MethodAddMonthsAdds the requested number of months to the current DateTime value.  
Public MethodAddSecondsAdds the requested number of seconds to the current DateTime value.  
Public MethodAddTicksAdds the requested number of clock ticks to the current DateTime value.  
Public MethodAddYearsAdds the requested number of calendar years to the current DateTime value.  
Public MethodCompareToCompares one SmartDate instance to another SmartDate instance.  
Public Methodstatic (Shared in Visual Basic)DateToStringConverts a date value into a text representation.  
Public Methodstatic (Shared in Visual Basic)DaysInMonthCalculates the number of days in the specified month and year.  
Public MethodEqualsOverridden to compare two dates based on value equivalency.  
Public MethodGetHashCodeOverridden to calculate this SmartDate's hash code based on its underlying date value.  
Public Methodstatic (Shared in Visual Basic)IsLeapYearIndicates whether the specified year is a leap year.  
Public Methodstatic (Shared in Visual Basic)ParseOverloaded. Converts the requested string representation of a date and time into its SmartDate equivalent.  
Public Methodstatic (Shared in Visual Basic)ParseExactOverloaded. Converts the requested string representation of a date and time into its SmartDate equivalent adhering to a specific format.  
Public Methodstatic (Shared in Visual Basic)StringToDateConverts a text date representation into a Date value.  
Public MethodSubtractOverloaded. Subtracts a TimeSpan from the current SmartDate instance if it is non-empty.  
Public MethodToLocalTimeGets the current DateTime value represented in local time based on the timezone configured on the machine.  
Public MethodToLongDateStringGets the long date string representation equivalent to the current DateTime value.  
Public MethodToLongTimeStringGets the long time string representation equivalent to the current DateTime value.  
Public MethodToShortDateStringGets the shortened date string representation equivalent to the current DateTime value.  
Public MethodToShortTimeStringGets the shortened time string representation equivalent to the current DateTime value.  
Public MethodToStringOverloaded. Returns a text representation of the SmartDate value formatted according to the FormatString.  
Public MethodToUniversalTimeGets the current DateTime value as represented in coordinated universal time (UTC).  
Public Operators
public Operator Addition Adds a TimeSpan value to a SmartDate instance.
public Operator Equality Overloaded. Compares whether two SmartDate instances are equivalent.
public Operator Greater Than Overloaded. Compares whether a SmartDate instance is greater than another SmartDate instance.
public Operator Greater Than or Equal Overloaded. Compares whether a SmartDate instance is greater than or equal to another SmartDate instance.
public Operator Inequality Overloaded. Compares whether two SmartDate instances are not equivalent.
public Operator Less Than Overloaded. Compares whether a SmartDate instance is less than another SmartDate instance.
public Operator Less Than or Equal Overloaded. Compares whether a SmartDate instance is less than or equal to another SmartDate instance.
public Operator Subtraction Overloaded. Deducts a TimeSpan value from a SmartDate instance.
See Also