How do you find the description of the DateTime class in the PHP documentation?
It's not a url or whatever, but you can get a fair idea using Reflection:
Reflection::export(new ReflectionClass('DateTime'));
Class [ class DateTime ] {
- Constants [11] {
Constant [ string ATOM ] { Y-m-d\TH:i:sP }
Constant [ string COOKIE ] { l, d-M-y H:i:s T }
Constant [ string ISO8601 ] { Y-m-d\TH:i:sO }
Constant [ string RFC822 ] { D, d M y H:i:s O }
Constant [ string RFC850 ] { l, d-M-y H:i:s T }
Constant [ string RFC1036 ] { D, d M y H:i:s O }
Constant [ string RFC1123 ] { D, d M Y H:i:s O }
Constant [ string RFC2822 ] { D, d M Y H:i:s O }
Constant [ string RFC3339 ] { Y-m-d\TH:i:sP }
Constant [ string RSS ] { D, d M Y H:i:s O }
Constant [ string W3C ] { Y-m-d\TH:i:sP }
}
- Static properties [0] {
}
- Static methods [0] {
}
- Properties [0] {
}
- Methods [9] {
Method [ public method __construct ] {
}
Method [ public method format ] {
}
Method [ public method modify ] {
}
Method [ public method getTimezone ] {
}
Method [ public method setTimezone ] {
}
Method [ public method getOffset ] {
}
Method [ public method setTime ] {
}
Method [ public method setDate ] {
}
Method [ public method setISODate ] {
}
}
}
Not perfect as there are no arguments, but at least a starting point. They should make it easier to find out, I agree!
source to share
http://no2.php.net/date_create
Information about the constructor. Some nice information about serialization in the comments.
http://laughingmeme.org/2007/02/27/ Nice tutorial, maybe old.
http://ditio.net/2008/06/03/php-datetime-and-datetimezone-tutorial/ Another slightly different approach.
source to share
PHP 5.2.0 provides a list of new classes:
http://www.php.net/manual/en/migration52.classes.php
.., which refers to new information about the DateTime class:
source to share
The url you mentioned http://www.php.net/manual/en/migration52.classes.php doesn't describe the class at all. Surely somewhere where this and other classes are documented.
source to share
The description can be found in the comments on the documentation:
http://php.net/manual/fr/book.datetime.php#84699
EDIT: I found something interesting this morning:
http://laughingmeme.org/2007/02/27/looking-at-php5s-datetime-and-datetimezone/
source to share
The documentation for the DateTime class can be found at php.net/DateTime , it contains information on both the class and the functions, or just the class documentation can be found at php.net/manual/en/class.datetime.php
source to share
The stuff is documented in the documentation - perhaps not at the time you asked for it.
Anyway, by the author of the extension, you can read to get full details: http://derickrethans.nl/phparchitects-guide-to-date-and-time-programming.html
Alongside what Derick Rethans talks here and there about the subject and the slides. If you have the opportunity to attend a conference and listen to one of his conversations, just do it.
Last:
FrOsCon, 22 Aug 2010: xxxx: //derickrethans.nl/talks/time-froscon10.pdf (Source: xxxx: //derickrethans.nl/talks.html)
source to share