Prev | Current Page 396 | Next

W. Jason Gilmore

"Beginning PHP and MySQL: From Novice to Professional"

The returned components are based on the present date and time
unless a Unix-format timestamp is provided. Its prototype follows:
array getdate([int timestamp])
In total, 11 array elements are returned, including the following:
hours: Numeric representation of the hours. The range is 0 through 23.
mday: Numeric representation of the day of the month. The range is 1 through 31.
minutes: Numeric representation of the minutes. The range is 0 through 59.
mon: Numeric representation of the month. The range is 1 through 12.
month: Complete text representation of the month, e.g., July.
seconds: Numeric representation of the seconds. The range is 0 through 59.
CHAPTER 1 2 ?–  D ATE AND T IME 331
wday: Numeric representation of the day of the week, e.g., 0 for Sunday.
weekday: Complete text representation of the day of the week, e.g., Friday.
yday: Numeric offset of the day of the year. The range is 0 through 364.
year: Four-digit numeric representation of the year, e.g., 2007.
0: Number of seconds since the Unix epoch (timestamp). While the range is
system-dependent, on Unix-based systems it??™s generally ??“2147483648 through
2147483647, and on Windows the range is 0 through 2147483648.
?– Caution The Windows operating system doesn??™t support negative timestamp values, so the earliest
date you could parse with this function on Windows is midnight, January 1, 1970.


Pages:
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408