Numeric date to PHP text date

Hey, I'm just wondering how to convert a numeric date to text format in PHP

Change Example

04/06/2010 to say April 6, 2010

Is there any function already?

+4
source share
2 answers

Check out these PHP functions that are used together, I think you will get what you are looking for:

i.e:.

$mydate = strtotime('06.04.2010'); echo date('F jS Y', $mydate); 
+12
source

Please note that strtotime () can be difficult with dates in a format other than the United States at different times (in particular, dates of the DD / MM / YYYY formats, although this is good with YYYY-MM-DD); if you are using PHP 5.3, you will almost certainly get better results using something like the DateTime class , which allows you to specify which format the date is in.

0
source

Source: https://habr.com/ru/post/1306185/


All Articles