This project is read-only.


The project is currently in alpha-stadium. This means, the current main-work is targetting the basic infrastructure-components. The base class is named DateTimeSpan. Everything else is and will be wrapped around this class. It has got two properties DateFrom and DateTo which are implemented as nullable DateTimes.


If the property EnsureCompleteDays is set to true, the class will ensure, that a span will not only contain the two dates with random times but also will include all relevant minutes inside the span. This is important because it is a very often used feature in tasks querying time-related data. Some additional properties are inserted for convenience-purposes. Examples:
  • CompleteTimeSpan returns a System.TimeSpan containing the span from DateFrom to DateTo
  • HasSpan returns true, if CompleteTimeSpan is longer than 0 ticks
  • Days returns a enumerable List of all Days as DateTimes contained inside the TimeSpan
The class implements the interfaces
  • INotifyPropertyChanged
  • IComparable
Some extension-methods are implemented in the static class Extensions:
  • LastDayOfMonth extends the int-type and takes a Year. It returns the DateTime of the last day of a month inside this year.
  • WeekOfYear returns the ISO-8601-week-number for a given DateTime and extends the DateTime-type.

Last edited Mar 30, 2010 at 2:08 AM by sprinter252, version 4


No comments yet.