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)    


 [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 ... 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: And I added a unit test into svn. It's tested with phpunit 3.2.16. Is this ok?: Also, I fixed the Coding Standard issues, too.: 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:
 [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: Source code is:
 [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: Source code is: 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 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 by the end of next Sunday (CET). If this was a problem with the 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.