M., P.M.
%R 24-hour time notation 00:01:00 through
23:59:59
%S Numerical seconds, with leading zero 00 through 59
%t Tab character \t
%T Equivalent to %H:%M:%S 22:14:54
%u Numerical weekday, where 1 = Monday 1 through 7
%U Numerical week number, where the first
Sunday of the year is the first day of the first
week of the year
17
%V Numerical week number, where week
1 = first week with >= 4 days
01 through 53
%W Numerical week number, where the first
Monday is the first day of the first week
08
%w Numerical weekday, where 0 = Sunday 0 through 6
%x Standard date 04/26/07
%X Standard time 22:07:54
%y Numerical year, without century 05
%Y Numerical year, with century 2007
%Z or %z Time zone Eastern Daylight Time
%% The percentage character %
Table 12-2. The strftime() Function??™s Format Parameters
Parameter Description Examples or Range
338 CHAPTER 12 ?– D ATE AND TIME
By using strftime() in conjunction with setlocale(), it??™s possible to format dates
according to your user??™s local language, standards, and customs. For example, it
would be simple to provide a travel Web site user with a localized itinerary with dates
and ticket cost:
Benvenuto abordo, Sr. Sanzi
setlocale(LC_ALL, "it_IT");
$tickets = 2;
$departure_time = 1118837700;
$return_time = 1119457800;
$cost = 1350.99;
?>
Numero di biglietti:
Orario di partenza:
Orario di ritorno:
Prezzo IVA incluso:
This example returns the following:
Benvenuto abordo, Sr.
Pages:
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415