DateTimeHandling Class Members
In This Topic
The following tables list the members exposed by DateTimeHandling.
Public Properties
| Name | Description |
  | Now |
Gets the current date/time
|
  | UtcNow |
Gets the current date/time
|
Top
Public Methods
| Name | Description |
  | Abs |
Returns the absolute value of the given TimeSpan (negative time is converted to positive)
|
  | CalculateEaster |
Calculates the date of Easter for a given year.
|
  | Combine |
Combines two DateTime values, using the date from one value and the time from the other.
|
  | ComDateToDateTime | |
  | CompareDateTime | Overloaded.
Compares two nullable DateTime values
|
  | CompareTime |
Compares only the time portion of two DateTime values (hour and minute only; milliseconds are ignored).
|
  | ConvertTimeZone | Overloaded. |
  | CurrentTZBias | |
  | DateTimeFromXml | |
  | DateTimeToComDate | Overloaded. |
  | DateTimeToXml | Overloaded. |
  | DayOfWeek |
Returns an integer corresponding to the day of the week for the specified date, with Sunday=1, Monday=2, ..., Saturday=7
|
  | DescribeDateRange | |
  | EndOfDay |
Returns a DateTime value representing 11:59:59 PM on the source day.
|
  | FiletimeToDateTime | |
  | FiletimeToTimeSpan | |
  | FirstDayOfMonth |
Returns a DateTime value representing the first day of the month that includes the source date.
|
  | FirstDayOfYear |
Gets a DateTime representing January 1 of the year of a specified date.
|
  | FirstWeekdayOfMonth |
Returns an integer indicating what day is the first day of the month in which the specified date occurs (Sunday=1...Saturday=7).
|
  | FormatSeconds |
Formats a number of seconds into a more readable format.
|
  | FormatTimespan |
Formats a timespan into a readable format.
|
  | FormatTimestamp | Overloaded. |
  | IsEndOfDay |
Determines whether the time portion of a DateTime is 11:59pm (seconds ignored)
|
  | IsLastDayOfMonth |
Determines whether a date value is the last day of the month.
|
  | IsLastOccurrenceInMonth |
Indicates whether a date is the last occurrence of a given weekday in the month. For example, if the value is a Monday, this
method returns True if the date is the last Monday of the month, or False if there are other Mondays after it.
|
  | IsStartOfDay |
Determines whether the time portion of a DateTime is 12:00am (seconds ignored)
|
  | LastDayOfMonth | Overloaded.
Returns a DateTime representing the last day of the month in which the specified date occurs.
|
  | NextMinute | Overloaded.
Gets the start of the next minute
|
  | NullComDate | |
  | OccurrenceInMonth |
Indicates what occurrence of a given day of the week the specified date represents. For example, if the value is a Monday, this method
determines whether it is the first, second, third, fourth, or fifth Monday of the month.
|
  | ParseRFC822Offset |
Parses an RFC822 timezone offset and returns total minutes.
|
  | ReadDateTimeOffset |
Creates a DateTimeOffset from separate DateTime and timezone offset values used for persistence.
|
  | RemoveSeconds | Overloaded.
Returns a new DateTime value identical to the source but with seconds set to 0.
|
  | RepresentsFullYear |
Indicates whether the specified pair of dates is January 1 to December 31 of the same year.
|
  | ShortDateTime | |
  | StartOfDay |
Returns a DateTime value representing 12:00:00 AM on the source day.
|
  | TimeFromXml | |
  | TimeString |
Returns the time portion of the specified value, in short time format.
|
  | TimeToXml | |
  | TimeValue | Overloaded.
Returns a DateTime representing the time portion only for the specified hour and minute
|
  | ToUTCDateTime |
Returns a DateTime value storing the sourceDateTime converted to UTC, but with the DateTimeKind==unspecified.
|
  | WeekOfMonth |
Indicates what week of the month a value falls in.
|
Top
See Also