Hour 16. Working with Dates and Times
What You’ll Learn in This Hour:
How to acquire the current date and time
How to get information about a date
How to format date information
How to test dates for validity
How to set dates
How to build a simple calendar script
How to build a class library to generate date pull-downs in HTML forms
Dates are so much a part of everyday life that it becomes easy to work with them without thinking. The quirks of your calendar can be difficult to work with in programs, though. Fortunately, PHP provides powerful tools for date arithmetic that make manipulating dates easy.
Get Sams Teach Yourself PHP in 24 Hours, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.