[PEPr] +1 for Date and Time::Date_HumanDiff
| From: | Michael Gauthier | Date: | Tue, 29 May 2012 17:56:04 +0000 |
| Subject: | [PEPr] +1 for Date and Time::Date_HumanDiff | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-54966@lists.php.net to get a copy of this message | ||
Michael Gauthier (http://pear.php.net/user/gauthierm) has voted +1 on the proposal for Date and
Time::Date_HumanDiff.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=678
Vote information:
http://pear.php.net/pepr/pepr-vote-show.php?id=678&handle=gauthierm
This vote is conditional. The condition is:
My vote is conditional as I have a few concerns:
1.) Method name setLocale() instead of setLanguage() makes more sense to me as you are passing in
locales. I'd rename Lang classes as Locale at the same time.
2.) Does the sort method need to be static? I'd make it protected and dynamic so it can be
overridden in subclasses.
3.) In makeTimestamp you use if ($foo) { return 'a'; } else { return 'b'; }. The
else is redundant. Two separate if statements might be clearer.
4.) isIncludable() has error suppression operator which is not allowed in PEAR. Can you use
file_exists + is_readable instead?
5.) Class docs for the Lang classes would be nice.
6.) What about languages with multiple plural forms? Will this work with Slocak or Arabic? Should
this library even be responsible for translating strings? Another library like gettext or
Zend_Translate seems like a better place to handle that.
7.) Regarding the trailing ?> IIRC you're supposed to use it in PEAR 1. PEAR2 says you must
not. It's not a blocker issue for me either way.