Wednesday 9 January 2013

Fancy a Date?

I spend an awful lot of time thinking about Dates, not the going to a restaurant and the cinema type, but the period of time.

I guess that to an extent we in the UK are in a similar situation to the rest of the world when it comes to English as most web-based technologies use American date format, which is a pain!

The American's use Month, Day and then Year when they write down their dates... that's just silly! We use Day, Month and then Year... which is cool and goes from smallest to largest whereas the American version goes from the middle to the smallest to the largest - where's the sense in that? I guess that to some extent it might be because they're used to measuring dates in terms of Months - perhaps because it used to take weeks or months to get from one end of their country to the other...?

Whatever the reason though, it's just silly! Ohh, and a pain!

Thankfully the programming language I primarily use has a built in Date object - but when I'm using JavaScript to talk to another programming language I get a little stuck. Thankfully a Date can be just a string so I can manipulate it into UTC for example - something I'm doing a lot lately thanks to SalesForce using UTC. But I think I'm going to alter that approach and use ISO format dates as the lovely JSPro released these two articles about writing and parsing ISO format dates and they seem to have enough detail for pretty much anything... of course that means I'm going to have to get the C# chaps at work to use it...

No comments:

Post a Comment