Date | Date_Holidays |
Date | |
PEAR Manual | |
The auto-generated API documentation is very valuable to get information about this packages' methods and which parameters they require. But of course you first need to have an overview about the abilities of the class.
There are a number of simple getter methods that let you retrieve single pieces of a date currently set.
Date does also have some advanced methods to obtain data from it.
getDayName returns the name of the day in short (Mon) or long form (Monday)
getMonthName returns the name of the month in short (Jan) or long form (January)
getDayOfWeek calculates the number of the day in the week (0-6, Sunday being 0)
getWeekOfYear returns the week number of this date
The following method all return a new date object.
You can also do excact calculations by adding and subtracting intervals. The *Span methods require a Date_Span object to be passed as only parameter while the others take a number representing seconds.
Date | Date_Holidays |
Date | |
PEAR Manual | |