Ignore:
Timestamp:
2014/05/20 15:59:33 (10 years ago)
Author:
pineray
Message:

#2393 閏年の処理を修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Holiday.php

    r23433 r23434  
    189189 
    190190        // 日付の妥当性チェック 
    191         $year = date('Y'); 
    192         $valid_date = false; 
    193         // 閏年への対応 
    194         for ($i = 0; $i < 4; $i++) { 
    195             if (checkdate($arrForm['month'], $arrForm['day'], $year + $i)) { 
    196                 $valid_date = true; 
    197                 continue; 
    198             } 
     191        // 閏年への対応. 
     192        if ($arrForm['month'] == 2 && $arrForm['day'] == 29) { 
     193            $valid_date = true; 
     194        } else { 
     195            $valid_date = checkdate($arrForm['month'], $arrForm['day'], date('Y')); 
    199196        } 
    200197        if (!$valid_date) { 
Note: See TracChangeset for help on using the changeset viewer.