PHP print Month in French?

前端 未结 6 900
独厮守ぢ
独厮守ぢ 2020-12-18 10:27

I want to print the date in french like:

le 25 février 2014

This is my PHP code I used but it\'s not working.

setlocale(LC_         


        
6条回答
  •  Happy的楠姐
    2020-12-18 11:14

    This works (tested)

    Which will print:

    Current Date: Wed 29 Jan 2014
    Date in French => Mercredi 29 Janvier 2014

    You just need to tweak it to format it the way you would like it to be.

    ";
    echo "Date in French => ".date_in_french($currentDate);
    

提交回复
热议问题