Dates

quidity on 2003-04-06T16:36:40

Date and time formatting is one of those things that no one wants to agree upon. In a recent fit of pique, and troubled by the general lack of standardisation and completeness of weblog syndication, I decided that the best way for me to view all my friends' journals was by screen scraping them and having a little program tell me if there was a date on the page which wasn't there last time I looked. A bit hacklike, but possibly the best way to spot journal entries while avoiding generic randomness like the footers on use.perl pages and servers that lie about how old a page is.

Anyhow, in the process of writing this home brewed aggregator, I was suprised to discover that people I knew (around thirty jounals worth reading, say) between them used seven different date formats. No problem, I thought, someone somewhere must have tried this before... so off I went to find the module that extracted dates from documents. I looked quite hard, but didn't find one. I didn't even find much on date extraction on citeseer. Of course, this is because doing date extraction in a general way is really quite hard, mostly because of the plethora of different ways people chose to represent dates (even where the problem domain is restricted to English language documents). Not being one to like hard work I followed the crowd on this one and wrote myself a slightly general date extraction module but don't expect that the world will be much improved by my releasing it, so on my rusty machine it will stay.

All this got me thinking about dates in other places. I often find myself annoyed with online forms that require date input. Each has its own very specific requirements on the way you enter the information, and each uses a slightly different one than anyone else. Not only must I remember when I last did X or first brought a Y, I have to run a little date2str(format_string) routine in my head before I'm allowed to get a quote, or buy something.

Surely, I thought (in an astounding fit of optimism, given my troubles mentioned above), someone's thought to find a way to let users input dates in their preferred format, and have a computer somewhere cope with the translation into the canonical form for my bank's systems. Fat chance of that. It wouldn't take much though. A configuration option in my browser somewhere (where I click the ISO button) and a date input field in html forms that lets my browser know what the server receiving the form is expecting. A little shake of wand later and everyone's a happy bunny.

Oh, and we won the boat race.