22-09-2008」などのタイムスタンプを取得するにはどうすればいいですか?
PHP'のstrtotime()`は、次のようになります。
$timestamp = strtotime('22-09-2008');
これはSupported Date and Time Formats Docsでは動作します。
ちょうど1つのフォーマットを期待するstrptime()
もあります。
$a = strptime('22-09-2008', '%d-%m-%Y');
$timestamp = mktime(0, 0, 0, $a['tm_mon']+1, $a['tm_mday'], $a['tm_year']+1900);