PERL:


PERL: - . 109


use POSIX qw(strftime),

use Time Local

$time = timelocal(50, 45 3, 18 0, 73),

print Scalar localtime gives , scalar(localtime($time)) \n ,

Scalar localtime gives: Thu Jan 18 03:45:50 1973

, localtime ­ . POSIX strftime ­ , pnntf, . %. strftime . strftime , / , ­, localtime:

use POSIX qw(strftime),

use Time Local,

$time = timelocal(50, 45 3, 18, 0, 73),

print strftime gives , strftime( %A %D , localtime($time)) \n ,

strftime gives: Thursday 01/18/73

POSIX strftime . , "Sunday" "Dimanche". : Perl strftime ­ POSIX , ­ .

strftime POSIX , ­ Date::Manip, 3.6.

use Date Manip qw(ParseDate UnixDate), $date = ParseDate( 18 Jan 1973, 3 45 50 ),


3.9. 107

$datestr = UmxOate($date, % % % % % %S % % ), # print Date Manip gives $datestr\n , Date::Mamp gives: Thu Jan 18 03:45:50 GMT 1973

!> --------------------------------------------------------------------------------------------

gmtime localtime perlfunc(l); perllocale(l); man- strftime(3) ; POSIX Date::Manip cCPAN.

3.9.




- -  - -  - -