Changeset 22636


Ignore:
Timestamp:
2013/03/09 18:15:12 (11 years ago)
Author:
yomoro
Message:

税率対応の一環として、sfGetTimestampを日時まで対応させたfunctionを作成

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/camp/camp-2_13-tax/data/class/util/SC_Utils.php

    r22603 r22636  
    274274    } 
    275275 
     276    /* DB用日付日時文字列取得 */ 
     277    function sfGetTimestampistime($year, $month, $day, $hour, $minutes, $last = false) 
     278    { 
     279        if ($year != '' && $month != '' && $day != '' && $hour != '' && $minutes != '') { 
     280            if ($last) { 
     281                $time = $hour.':'.$minutes.':59'; 
     282            } else { 
     283                $time = $hour.':'.$minutes.':00'; 
     284            } 
     285            $date = $year.'-'.$month.'-'.$day.' '.$time; 
     286        } else { 
     287            $date = ''; 
     288        } 
     289        return $date; 
     290    } 
     291 
    276292    /** 
    277293     *  INT型の数値チェック 
Note: See TracChangeset for help on using the changeset viewer.