Документ взят из кэша поисковой машины. Адрес оригинального документа : http://old.master.cmc.msu.ru/php/function.strftime.html
Дата изменения: Sun Feb 3 22:36:44 2002
Дата индексирования: Tue Oct 2 02:31:16 2012
Кодировка:
strftime

strftime

(PHP 3 <= 3.0.18, PHP 4 >= 4.0.0)

strftime --  Format a local time/date according to locale settings

Description

string strftime ( string format [, int timestamp])

Returns a string formatted according to the given format string using the given timestamp or the current local time if no timestamp is given. Month and weekday names and other language dependent strings respect the current locale set with setlocale().

The following conversion specifiers are recognized in the format string:

Note: Not all conversion specifiers may be supported by your C library, in which case they will not be supported by PHP's strftime().

Example 1. strftime() example

setlocale (LC_TIME, "C");
print (strftime ("%A in Finnish is "));
setlocale (LC_TIME, "fi_FI");
print (strftime ("%A, in French "));
setlocale (LC_TIME, "fr_FR");
print (strftime ("%A and in German "));
setlocale (LC_TIME, "de_DE");
print (strftime ("%A.\n"));
This example works if you have the respective locales installed in your system.

See also setlocale() and mktime() and the Open Group specification of strftime().