Changeset 10076
- Timestamp:
- 04/21/08 20:54:54 (7 months ago)
- Location:
- lang/php/Date_Holidays_Driver_Japanese
- Files:
-
- 4 modified
-
build.conf (modified) (1 diff)
-
notes.txt (modified) (1 diff)
-
sample.php (modified) (2 diffs)
-
src/Date/Holidays/Driver/Japanese.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/php/Date_Holidays_Driver_Japanese/build.conf
r9358 r10076 20 20 21 21 [version] 22 release_ver = 0.1. 022 release_ver = 0.1.1 23 23 release_stab = alpha 24 24 api_ver = 0.1.0 -
lang/php/Date_Holidays_Driver_Japanese/notes.txt
r9319 r10076 1 [0.1.1] 2 - Fixed building substitute holidays 3 1 4 [0.1.0] 2 5 - First release -
lang/php/Date_Holidays_Driver_Japanese/sample.php
r9319 r10076 1295 1295 require_once "Date/Holidays.php"; 1296 1296 1297 if ( false) {1298 $obj =& Date_Holidays::factory('Japanese', 1973);1297 if (true) { 1298 $obj =& Date_Holidays::factory('Japanese', 2008); 1299 1299 if (Date_Holidays::isError($obj)) { 1300 1300 die('Factory was unable to produce driver-object'); … … 1303 1303 foreach ($obj->getHolidayDates() as $holiday) { 1304 1304 echo $holiday->getDate() . "\n"; 1305 } 1306 for ($i=0;$i<366;$i++) { 1307 $t = mktime(0,0,0,1,$i+1,2008); 1308 $date = date('Y-m-d', $t); 1309 if ($obj->isHoliday($date)) { 1310 echo "[{$date}] holiday\n"; 1311 } 1305 1312 } 1306 1313 } else { -
lang/php/Date_Holidays_Driver_Japanese/src/Date/Holidays/Driver/Japanese.php
r9322 r10076 41 41 class Date_Holidays_Driver_Japanese extends Date_Holidays_Driver 42 42 { 43 var $_substituteHolidays = array(); 44 43 45 /** 44 46 * Constructor … … 63 65 { 64 66 parent::_buildHolidays(); 67 68 foreach ($this->_substituteHolidays as $internalName) { 69 $this->_removeHoliday($internalName); 70 } 65 71 66 72 $this->_buildNewYearsDay(); … … 429 435 } 430 436 if (!is_null($date)) { 437 $internalName = 'substituteHolidayFor' 438 . str_replace(' ', '', $name); 439 $this->_substituteHolidays[] = $internalName; 431 440 $this->_addHoliday( 432 'substituteHolidayFor' . str_replace(' ', '', $name),441 $internalName, 433 442 $date, 434 443 'Substitute Holiday for ' . $name);
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)