@Quismo; buyrun hocam
<?php
if(function_exists("strptime") === false)
{
/**
* @bknz: http://tr.php.net/manual/tr/function.strptime.php#103598
*/
function strptime($date, $format)
{
$masks = array(
'%d' => '(?P<d>[0-9]{2})'
'%m' => '(?P<m>[0-9]{2})',
'%Y' => '(?P<Y>[0-9]{4})',
'%H' => '(?P<H>[0-9]{2})',
'%M' => '(?P<M>[0-9]{2})',
'%S' => '(?P<S>[0-9]{2})'
/**
* Daha fazla eklemek için;
*
* @bknz: http://tr.php.net/manual/tr/function.date.php
*/
);
$pattern = '#' . strstr(preg_quote($format), $masks) . '#';
if(preg_match($pattern, $date, $matches) === false)
{
return false;
}
$response = array(
'tm_sec' => (int) $matches['S'],
'tm_min' => (int) $matches['M'],
'tm_hour' => (int) $matches['H'],
'tm_mday' => (int) $matches['d'],
'tm_mon' => $out['m'] ? $out['m'] - 1 : 0,
'tm_year' => $out['Y'] > 1900 ? $out['Y'] - 1900 : 0
);
return $response;
}
}