Because I can be lazy...
One thing I always hate on a personal website is doing the about page. It is always that forgotten section that you never know what to put on it, and it eventually falls out of date.
Specifically, I hate putting my age on there. I don’t care about telling people my age (I am 24, by the way), but I never update it. My birthday was 2 months ago, and yet I got to updating it rather early this time. Normally, it’ll be as long as 6 months behind.
So, I took a better step at ensuring it is more accurrate. Changed the page to use this to show my age:
<%=new DateTime(DateTime.Today.Subtract( new DateTime(1981, 4, 10) ).Ticks).Year-1 %>
It will work ok, but it is kind of ugly. For one, TimeSpan doesn’t have a Year parameter (and I can see why, as months have a different number of days, and years have different numbers of days [leap year]). This will work ok, but it can have a margin of error… mainly just updating to the next value a few days early or a few days late.