DateTime Utility for ASP.net

Question :

DateTime Utility for ASP.net,

Answer :

I was wondering if anyone could suggest a utility library that has useful functions for handling dates in ASP.NET easily taking away some of the leg work you normally have to do when handling dates?

Subsonic Sugar has some really nice functions:

 

Is there anything better out there?

I was wanting to work out the start(mon) and end(sun) dates of the last 5 weeks.

I was thinking something like this:

 DateTime Now = DateTime.Now;        while(Now.DayOfWeek != DayOfWeek.Monday)      {          Now.AddDays(-1);      }        for(int i=0; i<5;i++)      {          AddToDatesList(Now, Now.AddDays(7));          Now.AddDays(-7);      }  

but this seems crappy? Plus this is not exactly what i want because i need the time of that start date to be 00:00:00 and the time of the end date to be 23:59:59

,

Is there a specific problem you are trying to handle with dates? If the existing date API in .NET can handle your problem cleanly, I see no reason to consider a 3rd party library to do it. When I was in .NET, we had to deal with dates quite a bit, and the standard libraries provided a fair amount of functionality to us.

Read More  VS 2008 – Objects disappearing?

That's the answer DateTime Utility for ASP.net, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you