1
"26 January | 03h"という形式の日付を解析したいのですが、\DateTime::createFromFormat
では機能しません。これはバグですか?または私は何か間違っているのですか?DateTime :: createFromFormatこれはバグですか?
<?php
$format = 'j F | H\h';
$nowStr = (new \DateTime())->format($format);
$newDate = \DateTime::createFromFormat($format, $nowStr);
if ($newDate === false){
echo "What the F***!?";
}
else{
echo "My mistake!";
}
Testあなた自身。
さて、私はそれを発見できました。 –