3

Could you guys recommend me a library which handles the most common missing features for the Date object in C#?

.. Things like figuring out:

  • What quarter a given date is in
  • Get the start/end of a given quarter/month/week
  • Various subtraction -and addition methods

Note: A library which implements its features as extension methods would be a plus.

David Basarab
  • 72,212
  • 42
  • 129
  • 156
cllpse
  • 21,396
  • 37
  • 131
  • 170

3 Answers3

4

There are some interesting datetime extension methods (especially for addition/subtraction) in this post: Post your extension goodies for C# .Net.
Check in particular the first answer for datetime-based extension libraries. The methods are being collected in a CodePlex project, maybe it's worth having a look.

Community
  • 1
  • 1
Paolo Tedesco
  • 55,237
  • 33
  • 144
  • 193
2

Here is my attempt on extension methods for DateTime type. You can download it from sourceforge https://sourceforge.net/projects/xtensionsuite/

Also I have provided the list of methods so far I have added in this suite, and some examples in my blog. http://lazypro.nallenthal.in/ganesh-periasamy/english/coding/xtensionsuite-1/

hope this will help! :)

Ganesh
  • 21
  • 1
0

Haven't used it myself, but Jon Skeet is behind Noda Time, library designed to manage C# dates and times easier. Noda Time is based on Joda Time. Dedicated Noda Time blog can provide valuable insights.

Dialecticus
  • 16,400
  • 7
  • 43
  • 103