In this chapter, we discuss checking and formatting the date and time and converting between date formats. These capabilities are especially important when you are converting between MySQL and PHP date formats, Unix and PHP date formats, and dates entered by the user in an HTML form.
Key topics covered in this chapter include
Getting the date and time in PHP
Converting between PHP and MySQL date formats
Using the calendar functions
Way back in Chapter 1, “PHP Crash Course,” we described using the
date() function to get and format the date and time from PHP. Here, we discuss this function and some of PHP's other date and time functions in a little more detail. ...