Skip to content

Comment on Windows Azure Service Disruption on Feb 29th, 2012parent

Comments

I guess that the fundamental problem is thinking of months and years as numbers (and representing them as such).

If they were purely symbolic constants, then the expression "January + 1" is meaningless and would throw an error.

So, with hindsight, I'd say that any Datetime api which represents days, months and years as numeric quantities (which is, probably, all of them) encourages these kinds of bugs. (Or at least doesn't discourage them).

Can anyone come up with a use case where you need numeric values for these things? (Which doesn't suffer from the same kind of bugs as this?)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.