Web студия "GrandView"
  Главная   Написать Контакты
   
   
О проекте
Руководство php
 

date_parse

(no version information, might be only in CVS)

date_parse -- Returns associative array with detailed info about given date

Описание

array date_parse ( string date )

Список параметров

date

Date in format accepted by strtotime().

Возвращаемые значения

Returns array on success or FALSE on failure.

Примеры

Пример 1. A date_parse() example

<?php
print_r
(date_parse("2006-12-12 10:00:00.5"));
?>

Результат выполнения данного примера:

Array
(
    [year] => 2006
    [month] => 12
    [day] => 12
    [hour] => 10
    [minute] => 0
    [second] => 0
    [fraction] => 0.5
    [warning_count] => 0
    [warnings] => Array()
    [error_count] => 0
    [errors] => Array()
    [is_localtime] => 
)

Смотрите также

getdate()



add a note add a note User Contributed Notes
date_parse
tekmosis[at]neoseeker[dot]com
30-Oct-2007 02:40
If you're using PHP4 and need similar usage of this function there is getdate() however, getdate() only accepts a timestamp and not a date time; a work around is to use strtotime() in conjunction.

Example usage:
getdate(strtotime('2006-12-12 10:00:00'));

Result:
Array
(
    [seconds] => 0
    [minutes] => 0
    [hours] => 10
    [mday] => 12
    [wday] => 2
    [mon] => 12
    [year] => 2006
    [yday] => 345
    [weekday] => Tuesday
    [month] => December
    [0] => 1165946400
)

Note: This is only helpful if you're looking just for the month, day, year, hour, minute, second values.
gpayne at galenaparkisd com
29-Sep-2007 04:52
Careful - date_parse is perfectly happy with something like this:

 date_parse("2006-2-31");

date_sun_info> <date_offset_get
Last updated: Sat, 27 Jan 2007
 
 
Новости
11 июля 2007
Сайт запущен
© 2007 info@grandviewstudio.com

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 324

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 330
Z058440144362 Z348613067571