There is not really a straightforward method to calculate a person’s age using the .Net DateTime type. Subtracting years is not a correct means. What is required is to round down a person’s age until that person’s birthday has passed for the given year it is being calculated against. This is what these simple set of extensions to the .Net DateTime class intend to provide.
Tuesday, September 15, 2009
Age Extension Methods for .Net DateTime Type
Posted by
K Jacobson
at
7:45 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment