<?php
// strftime ( ) locale examples
setlocale ( LC_TIME , "C" );
echo strftime ( "%A" );
setlocale ( LC_TIME , "fi_FI" );
echo strftime ( " in Finnish is %A, " );
setlocale ( LC_TIME , "fr_FR" );
echo strftime ( " in French %A and" );
setlocale ( LC_TIME , "de_DE" );
echo strftime ( " in German %A.\n" );
?>
<?php
// Cross platform compatible example using the %e modifier
// Jan 1: results in: '%e%1%' ( %% , e, %% , %e , %% )
$format = '%%e%%%e%%';
// Check for Windows to find and replace the %e
// modifier correctly
if ( strtoupper ( substr ( PHP_OS, 0, 3 ) ) == 'WIN' )
{
$format = preg_replace ( '#(?<!%)((?:%%)*)%e#' , '\1%#d' , $format );
}
echo strftime ( $format );
?>
<?php
setlocale ( LC_TIME , "ru_RU" );
echo strftime ( '%d-%B-%Y, %A' );
?>