<p>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?</p>

<p>Subsonic Sugar has some really nice functions:</p>

<p><a href="http://subsonichelp.com/html/1413bafa-b5aa-99aa-0478-10875abe82ec.htm" rel="nofollow noreferrer">http://subsonichelp.com/html/1413bafa-b5aa-99aa-0478-10875abe82ec.htm</a>
<a href="http://subsonicproject.googlecode.com/svn/trunk/SubSonic/Sugar/" rel="nofollow noreferrer">http://subsonicproject.googlecode.com/svn/trunk/SubSonic/Sugar/</a></p>

<p>Is there anything better out there?</p>

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

<p>I was thinking something like this:</p>

<pre><code> DateTime Now = DateTime.Now;

    while(Now.DayOfWeek != DayOfWeek.Monday)
    {
        Now.AddDays(-1);
    }

    for(int i=0; i&lt;5;i++)
    {
        AddToDatesList(Now, Now.AddDays(7));
        Now.AddDays(-7);
    }
</code></pre>

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

[{'answer_id': 61645, 'author': 'Mike Stone', 'author_id': 122, 'author_profile': 'https://Stackoverflow.com/users/122', 'pm_score': 2, 'selected': False, 'text': '<p>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.</p>\n'}, {'answer_id': 61698, 'author': 'Joel Coehoorn', 'author_id': 3043, 'author_profile': 'https://Stackoverflow.com/users/3043', 'pm_score': 0, 'selected': False, 'text': "<p>What exactly do you want to do that System.DateTime and System.Timespan can't handle?</p>\n"}, {'answer_id': 62088, 'author': 'Rikalous', 'author_id': 4271, 'author_profile': 'https://Stackoverflow.com/users/4271', 'pm_score': 0, 'selected': False, 'text': "<p>CSLA has a useful helper class called SmartDate that addresses quite a lot of the problems when using dates in real applications. As far as I can recall it's coupled to the rest of the framework.</p>\n"}]
['https://Stackoverflow.com/questions/61638', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/230/']