date_parse


 

date_parse

This is the example of array date_parse used for getting the detailed information about given date. Learn how to define date_parse() in PHP programming Language.

This is the example of array date_parse used for getting the detailed information about given date. Learn how to define date_parse() in PHP programming Language.

date_parse() in PHP

date_parse function returns associative array with detailed information about given date. It returns information about the date on success, or FALSE on failure. An error message will display if date format faces any error.

Description on Date Parse Format in PHP

array date_parse ( string $date )

Parameters of date parse class PHP

date - Date in format accepted by strtotime()



Example of Parse Date Function in PHP:

<?php


print_r(date_parse("2009-04-28 07:45:20.5"));


?>



The above example will output:



Array


(


[year] => 2009


[month] => 04


[day] => 28


[hour] => 07


[minute] => 45


[second] => 20


[fraction] => 0.5


[warning_count] => 0


[warnings] => Array()


[error_count] => 0


[errors] => Array()


[is_localtime] => 


)

Ads