Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.1.3

Bug #14573 return incorrect titles with 'ja_JP' lang file
Submitted: 2008-08-27 06:01 UTC
From: hshimooka Assigned: hshimooka
Status: Closed Package: Date_Holidays_Japan (version 0.1.0)
PHP Version: 5.2.6 OS: CentOS4.6
Roadmaps: (Not assigned)    
Subscription  


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 16 + 16 = ?

 
 [2008-08-27 06:01 UTC] hshimooka (Hideyuki Shimooka)
Description: ------------ If with a lang file, getTitle() for 'yyyy-04-29' return same title. Test script: --------------- <?php require_once 'Date/Holidays.php'; $filename = '/path/to/data/Date_Holidays_Japan/lang/Japan/ja_JP.xml'; $dh = &Date_Holidays::factory('Japan', 1999, 'ja_JP'); $dh->addTranslationFile($filename, 'ja_JP'); _p($dh, 1949); _p($dh, 1989); _p($dh, 2007); function _p($dh, $year) { $dh->setYear($year); echo sprintf("%s / %s / %s\n", $year, $dh->getHolidayForDate("{$year}-04-29", 'ja_JP')->getTitle(), $dh->getHolidayForDate("{$year}-04-29", 'C')->getTitle()); } Expected result: ---------------- 1949 / 天皇誕生日 / Showa Emperor's Birthday 1989 / みどりの日 / Greenery Day 2007 / 昭和の日 / Showa Day Actual result: -------------- 1949 / 昭和の日 / Showa Emperor's Birthday 1989 / 昭和の日 / Greenery Day 2007 / 昭和の日 / Showa Day

Comments

 [2008-08-27 06:06 UTC] hshimooka (Hideyuki Shimooka)
 [2008-09-06 15:18 UTC] kguest (Ken Guest)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.