Click or drag to resize

DateTimeExtensions Class

DateTime extension methods.
Inheritance Hierarchy
SystemObject
  NetQuarryDateTimeExtensions

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public static class DateTimeExtensions

The DateTimeExtensions type exposes the following members.

Methods
  NameDescription
Public methodStatic memberConvert
Converts a date from one TimeZone to another. If either TimeZone is null the date/time is not converted. Note that converting time-only values is generally not recommended as daylight savings time cannot be properly handled and because proper conversion may change the date as well as the time.
Public methodStatic memberHasTime
Determines whether or not this date/time value includes a time (as opposed to just a date). Note that it is impossible to distinguish between a date-only DateTime value and a DateTime value with a time of exactly midnight.
Public methodStatic memberIsNoon
Determines whether or not this date/time value represents noon on any date.
Public methodStatic memberIsTimeOnly
Determines whether or not this date/time value represents a time-only without a date. Time-only values include a date component of 1/1/0001 OR 12/30/1899 (the COM (OleAutomation) time-only date).
Public methodStatic memberJSDate
Generate a javascript Date object instantiation string for this date/time. The result will be of the form new Date(yyyy,M,d,H,m,s).
Public methodStatic memberRemoveDate
Create a new date/time object removing the date component with the specified date value. The date component is "removed" by setting it to 1899-12-30 (see IsTimeOnly(DateTime)). See also SetDate(DateTime, DateTime).
Public methodStatic memberSetDate
Create a new date/time object replacing the date component with the specified date value. See also RemoveDate(DateTime).
Public methodStatic memberToUnixTimeSeconds(DateTime)
Converts a DateTime to an integer.
Public methodStatic memberToUnixTimeSeconds(NullableDateTime)
Converts a nullable DateTime to an integer.
Public methodStatic memberTruncate
Truncates a DateTime to a specified resolution.
Top
See Also