Skip to content

Latest commit

 

History

History
42 lines (28 loc) · 2.21 KB

Assorted.Utils.Dates.DateUtils.md

File metadata and controls

42 lines (28 loc) · 2.21 KB

DateUtils Class

Namespace: Assorted.Utils.Dates
Assembly: Assorted.Utils (Assorted.Utils.dll) version 1.1.0.0
Inheritance: object DateUtils

Provides some helper methods for working with System.DateTime values.

Syntax

public static class DateUtils

Fields

Field Description
DaysPerWeek The number of days in a week.

Methods

Method Description
DateFor(WeekOfMonth, DayOfWeek, int, int) Returns the date for a specific occurrence of a given day of the week in a specified month of a the year.
DateFor(WeekOfMonth, DayOfWeek, MonthOfYear, int) Returns the date for a specific occurrence of a given day of the week in a specific month of the year.
DateForIso8601(int, int, DayOfWeek) Converts a specified ISO-8601 year, week of the year and day of the week to its System.DateTime equivalent value.
DaysFromStartOfTheWeekToDayOfWeek(int, DayOfWeek) Returns the day of the week for the number of days after start of the week.
ParseIso8601(string) Converts the string representation of a date in ISO-8601 format to its System.DateTime equivalent value.
WeeksInYear(int) Returns the number of ISO-8601 weeks in a given year.

Thread Safety

Any public static member of this type is thread-safe, but instance members are not guaranteed to be thread-safe.

See Also


This document is generated by DG.