Library for calculating time periods for the .NET platform

Original author: Jani Giannoudis
  • Transfer
Introduction
In the process of writing software for another project, I was faced with the need to work with the calculation of time periods. These calculations were an important part of the solution; accordingly, the requirements for the correctness and accuracy of the results were high.

The necessary functionality affected the following areas:

1. Support for individual time periods
2. Work with a calendar of periods within a calendar year
3. Work with a calendar of periods outside the calendar year (fiscal year or school year)

Such calculations should be available for server component (web services and tasks), and for "thick" clients (Silverlight).

An analysis of the situation led me to the conclusion that neither the .NET Framework components (which I did not expect) nor the other available tools meet all my requirements. And since I already encountered similar problems in previous projects, I decided to develop a library for these purposes.

Several development cycles led to the creation of the Time Period library, now available for such runtime environments:

1. .NET Framework version 2 and higher
2. .NET Framework for Silverlight from version 4
3. .NET Framework for Windows Phone from version 7

To demonstrate parts of the library’s functionality, I made an application on Silverlight, named it Calendar Period Collector and posted it at http://www.cpc.itenso.com/. The application demonstrates the search for calendar periods.

Next, we read the translation in the blog (a lot of code, it is not possible to transfer it to Habr qualitatively):
Read more .

The article became the best article on C # on the CodeProject website in March 2011, as well as the best article on the CodeProject website in March 2011.

Source codes and links :
Source code of the project on CodeProject: Download the code .
Source code of the project on box.com: Download the code .
Link to the original article: author Jani Giannoudis .

Convincing request
Before minus the note without reading the article, make an effort anyway - look at least at the amount of work done. And if your minus is due to the fact that the article is not fully published on Habré and you are ready to provide assistance with a quality code transfer, I will gladly accept your help and post it here in its entirety.

Also popular now: