MusicBrainz: Paste-A-Date!

By stars Last update Apr 14, 2012 — Installed 426 times.


Script Summary: This script adds a field after the existing date fields where you can paste a date and it will try to parse it.

Version: 2012-04-14

This is still very much a work in progress and may not work at all. Currently it does parse dates in Opera 10.10, Safari and Firefox 3.6. I haven't tried any other browsers.

Supported:
* Numeric dates in the form DD MM (YY)YY, MM DD (YY)YY or (YY)YY MM DD. Day and month are optional. It's not fussy about the separators.
* Numeric dates with the month written in roman numerals (e.g. 07.VIII.2009).
* Dates with the full or abbreviated month name (e.g. February 15 2001, 8 Mar 99).
* Thai year numbering, e.g. 07.08.2552.

Unsupported:
* Month names/abbreviations in many languages. If you come across some it doesn't support, give me a link to the site where you found it and I'll see what I can do.
* Ordinal numbers in dates with the month name (e.g. 1st May 2010).
* Dates with no separators (e.g. 20090807; 07082009; 08072009).
* Alternate year numbering systems (e.g. Japanese 平成21年12月30日; Taiwanese 民國98年08月07日).
* Any other calendars.
* Spanish months in the form "XX de month de YYYY"

Known bugs:
* CJK/Korean dates with incomplete years (e.g. 08年03月02日) aren't actually ambiguous.

Version history:
2012-04-14: Fixes to the regexes which should mean better matching in Opera. Thanks Bitmap!
2012-01-06 uploaded 2012-04-14: This version apparently fixes the bizarre suggestions.
2012-01-05: Fix silly mistakes in regexes to allow days greater than 12 when there's a month name. Added Spanish months to the list of month names.
2012-01-04: Add support for month names, numeric dates with the month in roman numerals and Thai year numbers.
2011-12-24 v2: Fix display in the release editor
2011-12-24: Fix handling of multiple possibilities
2011-12-23: Original version