Parse french date in php

前端 未结 6 1070
南笙
南笙 2021-01-18 09:55

I have string:

\"Lundi, 08 Juillet 2013 09:09\"

How can I parse this type string?

I try:

    $date = \'08 Juillet 2013 09:0         


        
6条回答
  •  说谎
    说谎 (楼主)
    2021-01-18 10:05

    try this code, its important to first use setlocale

     $date = '08 Juillet 2013 09:09';
     setlocale(LC_TIME, 'fr-FR');
     $time = strptime($date, "%d %B %G %H:%M");
     print_r($time);
    

提交回复
热议问题