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

Request #13740 Date_Holidays_Driver_Japanese
Submitted: 2008-04-22 08:14 UTC
From: hshimooka Assigned: kguest
Status: Closed Package: Date_Holidays (version 0.18.0)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


Comments

 [2008-04-23 11:21 UTC] doconnor (Daniel O'Connor)
Hey Hideyuki, nice work! What's the deal with buildVernalEquinoxDay? $day = floor(20.8357 + 0.242194 * ($this->_year - 1980) - floor(($this->_year - 1980) / 4)); looks a bit funny, and could do with a few one line comments around the place And, is there any chance of turning http://coderepos.org/share/browser/lang/php/Date_Holidays_Driver_Japanese/sample.php ... into a .phpt / unit test?
 [2008-04-23 13:19 UTC] kguest (Ken Guest)
hi, The code looks very good and is well thought out. Some test files would be useful though and perhaps work on fixing some of the few Coding Standard issues as highlighted by phpcs/PHP_CodeSniffer - these are mostly indentation and phpdoc issues and should give hardly any trouble to correct. well done! k.
 [2008-04-23 16:25 UTC] hshimooka (Hideyuki Shimooka)
Hi, Daniel and Ken. Thank you for your replies:-) That expression is approximate expression and calculate the day of Vernal Equinox Day. Those constants (20.8357, 0.242194 and so on) are based on the astronomy. Please visit: http://www.h3.dion.ne.jp/~sakatsu/holiday_logic_English.htm And I added a unit test into svn. It's tested with phpunit 3.2.16. Is this ok?: http://coderepos.org/share/browser/lang/php/Date_Holidays_Driver_Japanese/src/test/Date_Holidays_Driver_Japanese_TestSuite.php Also, I fixed the Coding Standard issues, too.: http://coderepos.org/share/browser/lang/php/Date_Holidays_Driver_Japanese/src/Date/Holidays/Driver/Japanese.php Thanks.
 [2008-04-24 01:02 UTC] doconnor (Daniel O'Connor)
Ah hah! > Those constants (20.8357, 0.242194 and so on) are based on the astronomy. In that case, can you make the assorted figures into a class constant? Eg: class Circle { const PI = 3.145; public function getArea($radius) { return (self::PI * pow($radius, 2)); } }
 [2008-04-24 01:02 UTC] doconnor (Daniel O'Connor)
(or a define() for PHP4 compatibility)
 [2008-04-24 07:39 UTC] hshimooka (Hideyuki Shimooka)
Hi Daniel. Thank you for your advice. I make constats with define(), and added comments: http://coderepos.org/share/browser/lang/php/Date_Holidays_Driver_Japanese/src/Date/Holidays/Driver/Japanese.php
 [2008-05-12 12:56 UTC] hshimooka (Hideyuki Shimooka)
I have upgraded Date_Holidays_Driver_Japanese. It works fine with Date_Holidays 0.19.1 and if rename to Date_Holidays_Japan, fine too. PEAR Package is: http://www.doyouphp.jp/pear/Date_Holidays_Driver_Japanese-0.2.2.tgz Source code is: http://coderepos.org/share/browser/lang/php/Date_Holidays_Driver_Japanese/ http://coderepos.org/share/browser/lang/php/Date_Holidays_Driver_Japanese/src/Date/Holidays/Driver/Japanese.php
 [2008-06-05 09:28 UTC] hshimooka (Hideyuki Shimooka)
I've just commited Date_Holidays_Japan to svn. It's same as Date_Holidays_Japan 0.2.2 . PEAR Package is: http://www.doyouphp.jp/pear/Date_Holidays_Japan-0.0.1.tgz Source code is: http://coderepos.org/share/browser/lang/php/Date_Holidays_Japan/ Should I propose to PEPr or something?
 [2008-08-19 08:05 UTC] kguest (Ken Guest)
Hi Hideyuki, Just wanted to let you know I haven't forgotten about you or your Date_Holidays_Driver_Japan package - I have been kept rather busy. I will add it to PEAR's CVS repository by the end of the week. I will need to make small changes when I do this - for example the channel specified in package.xml will be changed to pear.php.net. Thanks again for your hard work - it is very much appreciated! ken
 [2008-08-23 12:50 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.