Mini Blog‎ > ‎

Is Date Arithmetic Really That Difficult?

posted Mar 3, 2011, 7:57 AM by Vick Khera
I was just reviewing some invoice from one of my vendors, a content delivery network.  The one for last month showed the services rendered were for "1/31/2011 to 2/30/2011".  I went back and looked at some others.  I paid for services on 11/31/2010 last fall.  I'd also say I paid for 9/31/2010 but I can't because the invoice where that was expected reads 0/31 instead.  I fully expect to pay for 2/31/2011 on my next invoice.  I guess they will owe me four days. :-)

Here's a screenshot:


Is it really that hard to do date arithmetic correctly?  There are plenty of standard libraries that have solved nearly every date manipulation problem known to man, and they are available in every useful programming language.  Please, people, just use them!
Comments