Help for this page

Select Code to Download


  1. or download this
        use Time::Local 'timelocal_nocheck';
    
    ...
        my $dyear = 176;
        my $epoch = timelocal_nocheck 0,0,0,$dyear,0,$year;
                             ## January is month 0 ^
    
  2. or download this
        my ($month, $day) = (localtime $epoch)[4,3];
        $month++;  ## again, months run from 0 to 11
    
  3. or download this
        use POSIX 'strftime';
        print strftime("%x", localtime $epoch), $/;
    
  4. or download this
    $ perl -MPOSIX=strftime -le 'print strftime("%c", 0,0,0,176,0,103)'
    Thu Jun 25 00:00:00 2003