DateUtils Class

This is a sealed class that contains various helpful date utility methods used by other classes in the PDI library.

Definition

Namespace: EWSoftware.PDI
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2023.1.2.0
public static class DateUtils
Inheritance
Object    DateUtils

Methods

CalculateFixedDate This method is used to calculate the date on which a fixed day occurs (for example, July 4th). However, it adjusts the date to the preceding Friday if the date falls on a Saturday or the following Monday if the date falls on a Sunday.
CalculateFloatingDate This method is used to calculate the date on which a floating day occurs (for example, the 4th Thursday in November).
CalculateOccurrenceDate This method is used to calculate the date on which a specific occurrence of any of a set of days occurs (for example, the 4th weekday in November or the last weekend day in January).
DateFromWeek This method returns a date calculated from a year, a week number, and the day on which weeks start
EasterSunday This method can be used to calculate the Easter Sunday date using one of three methods defined by EasterMethod.
FromISO8601String This method is used to convert an ISO 8601 formatted date string to a DateTime value that it represents.
FromISO8601TimeZone This method is used to convert an ISO 8601 time zone string into a TimeSpan object.
IsFloatingFormat This method is used to see if an ISO 8601 formatted date string is in floating format (a universal time indicator or time zone offset is not specified).
ToDayOfWeek This can be used to explicitly convert a DaysOfWeek value to a DayOfWeek value.
ToDaysOfWeek This can be used to explicitly convert a DayOfWeek value to a DaysOfWeek value.
WeekFromDate This can be used to determine the week of the year in which a specified date falls
WeeksInYear This is used to determine the number of weeks in a year

See Also