Hi Mike On Wed, 2011-09-14 at 20:44 +1000, Mike Hamilton wrote: > DateTime::Format::Gedcom (thanks, Ron!) is installed, and am just starting to > play with it. I have a plethora of torture tests in the form of weird and > wonderful dates in GEDCOMs from my far-flung and less than computer-literate > umpteenth cousins.
I'm glad you're going to torture the code, apart from the fact I'll probably have to improve it afterwards :-). Make sure you're using V 1.01. > Am a little surprised by the "month_names_in_" (Dutch, French, Gregorian, > Hebrew, Julian) stuff, with the language name hard-coded. Understand. I don't really like the design. It's due to 2 factors: o The GEDCOM standard specifically lists only a few language escapes, on p 45: Gregorian, Julian, Hebrew, French, Roman and Unknown. Make of that what you will. o The previous author of Gedcom::Date added some Dutch words to his code, so I added the Dutch month names. I should have put the URL I used in the POD. I'll fix that: http://wordinfo.info/unit/3233?letter=C&spage=2 But there's another problem: Accents on letters aka I18N. My first attempt to include modern French month names resulted in a Perl syntax error, so I haven't yet learned how to make the source UTF-8, even though I /thought/ that was my default (under Emacs). Moral: Still learning - Must to better. > Wikipedia says (http://en.wikipedia.org/wiki/Lists_of_languages) : > > "According to SIL International, there are 6,309 spoken languages, as > cataloged and described in the book Languages of the World (ISBN 0883128152). > The International Organization for Standardization (ISO) assigns codes for > most languages: for example, ISO 639-3 uses "eng" for English and "apk" for > Plains Apache, one of the five Apache languages of North America." > > Of course, one would only ever encounter a tiny fraction of those 6,309 > languages. But (say) you want Spanish, German, Italian; this would require > month_names_in_spanish, month_names_in_german, month_names_in_italian, which > seems rather silly. > > So, my very simple suggestion is that month_names_in_dutch(), > month_names_in_french() [...] be replaced with month_names_in(language). I'll have a think about your suggestion, but the reason I listed all languages in separate methods was so that people could easily sub-class my code and add 1 method for their favourite language (before I ripped-off - errr incorporated - their code into mine :-). That way, a sub-class and the addition of @#DNewLanguage@ to their GEDCOM file meant no code changes from me would be necessary to get them up and going. Anyway, glad to hear the code is of interest to someone... -- Ron Savage http://savage.net.au/ Ph: 0421 920 622