Prev | Current Page 406 | Next

W. Jason Gilmore

"Beginning PHP and MySQL: From Novice to Professional"


??? Navigating calendars in a manner reminiscent of that used by the Gnome
Calendar and Windows Date & Time Properties interface.
??? Validating any date. For example, you can use Calendar to determine whether
April 1, 2019, falls on a Monday (it does).
??? Extending Calendar??™s capabilities to tackle a variety of other tasks??”date analysis
for instance.
Before you can begin taking advantage of this powerful package, you need to install it.
You learned about the PEAR package installation process in Chapter 11 but for those of
you not yet entirely familiar with it, the necessary steps are reproduced next.
Installing Calendar
To capitalize upon all of Calendar??™s features, you also need to install the Date package.
Let??™s take care of both during the Calendar installation process, which follows:
%>pear install -a -f Date
WARNING: failed to download pear.php.net/Calendar within preferred state
"stable", will instead download version 0.5.3,
stability "beta"
downloading Calendar-0.5.3.tgz ...
Starting to download Calendar-0.5.3.tgz (63,274 bytes)
................done: 63,274 bytes
downloading Date-1.4.7.tgz ...
Starting to download Date-1.4.7.tgz (55,754 bytes)
...done: 55,754 bytes
install ok: channel://pear.php.net/Date-1.4.7
install ok: channel://pear.php.net/Calendar-0.5.3
342 CHAPTER 12 ?–  D ATE AND TIME
The ??“f flag is included when installing Calendar here because, at the time of this
writing, Calendar was still a beta release.


Pages:
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418