php 日期转换成日時刻截
private function toTimeStamp ($dateTimeString = NULL) {
if (!$dateTimeString) {
$dateTimeString = time();
}
$numeric = '';
$add_space = false ;
for($i=0;$i
if($add_space) {
$numeric .= ' ';
$add_space = false;
}
} else {
$numeric .= $dateTimeString[$i];
$add_space = true;
}
}
$数値配列 = 爆発( ' ',$numeric,6);
if(sizeof($numeric_array) throw new Exception($dateTimeString . ' は無効なパラメータです', 5);
} else {
$result = mktime(intval($numeric_array[3]), intval($numeric_array[4]), intval( $numeric_array[5]),
intval($numeric_array[1]), intval($numeric_array[2]), intval($numeric_array[0])) ;
}
return $result;
}