csv2hw.pl 0.2.4

id:jishiha さんより特殊日付(2004-00-00 とか)の日記があると csv2hw.pl がエラーで止まるとのご指摘。修正案を参考に fix して、バージョン 0.2.4 として公開しました。

http://www.horobi.com/xml/XHatenaML/scripts/csv2hw.pl

(追記) Time::Local の timelocal() で year を 1900 引く形で渡して呼び出すと実行時の日時によって結果が変わるので、バージョン 0.2.4a で、西暦をそのまま渡すようにしました。

perldoc Time::Local より:

       o   Years in the range 0..99 are interpreted as shorthand
           for years in the rolling "current century," defined as
           50 years on either side of the current year.  Thus,
           today, in 1999, 0 would refer to 2000, and 45 to 2045,
           but 55 would refer to 1955.  Twenty years from now, 55
           would instead refer to 2055.  This is messy, but
           matches the way people currently think about two digit
           dates.  Whenever possible, use an absolute four digit
           year instead.