Help for this page

Select Code to Download


  1. or download this
    use POSIX 'strftime';
    
    ...
    my $then = $now + (20 * 86_400); # 86,400 seconds in a day
    my $then_str = strftime('%d %B %Y', localtime($then));
    print "In 20 days time it will be $then_str\n";
    
  2. or download this
    use POSIX 'strftime';
    
    print "In 20 days time it will be ",
          strftime('%d %B %Y', localtime(time + 20 * 86_400)),
          "\n";