DateHelper Class

Helper class for DateTime operations

Definition

Namespace: CoreMX.NET.Helpers
Assembly: CoreMX.NET (in CoreMX.NET.dll) Version: 1.0.0+7eb54d7f3459576d25646e9f286fb1fe49eac8a5
C#
public static class DateHelper
Inheritance
Object    DateHelper

Methods

Difference Get the difference between two DateTime objects
GetDateRange Get all dates between two dates
GetDayName Get the day name
GetIso8601FirstDateOfWeek Gets the first date in a iso8601 week
GetIso8601WeekOfYear Gets the iso8601 week number of the year
GetMonthName Get the localized month name
GetShortDayName Get the Short day name
IsExpired(DateTime, Double) Check if a DateTime object is expired based on minutes
IsExpired(DateTime, TimeSpan) Check if a DateTime object is expired based on a TimeSpan
RoundToClosest(DateTime, Double) Round a Time to closest minutes
RoundToClosest(DateTime, TimeSpan) Round a DateTime to the closest TimeSpan (for Instance 5 minutes)
ToDateTime Converts a TimeSpan to a DateTime object
ToShortDateTimeString Creates a short date time string
ToTimeString Converts a TimeSpan to a hh:mm string
ToUnixTimestamp Converts a Unix timestamp to a DateTime object

See Also