빅토리아 데이를 찾으려고 시도하면서"Monday at May 24 or $ May ". 휴일 날짜 : "월요일 또는 5 월 24 일 전"어떻게 다음 문자열 날짜 형식을 찾을 수 있습니까? "Date Monday strtotime
메신저는 DateTime이 허용하는 올바른 형식을 찾을 수 없습니다.
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (Monday on or before May 24 2015) at position 7 (o): The timezone could not be found in the database
if ($GYear >= 1845) {
$VictoriaDay = new DateTime("Monday on or before May 24 $GYear", new DateTimeZone("UTC"));
$VictoriaDay_Day = $VictoriaDay->format('j');
if ($GDay == VictoriaDay_Day) {
return "Victoria Day";
}
}
모든 suggestiion하시기 바랍니다 내가 날짜 시간을 통해이 날짜를 얻을 수있는 방법에 :
내가이 코드를 실행하려고
내가는 치명적인 eror을 얻을? thianks!
! 하지만 몇 가지 생각 ... 나는 "$ victoriaDay = 새로운 DateTime ("이전 월요일 $ GYear - 05-25 ", 새로운 DateTimeZone ("UTC ")); " – codingnighter2000
@ codingnighter2000 문장을 사용할 수 있음을 알았습니다. 놀랍게도 작동하지만, [그것이!] (https://3v4l.org/abJfq). 잘 했어 :) – vascowhite