Posted By

kitzelh on 10/16/09


Tagged

yesterday


Versions (?)

Yesterday in Perl


 / Published in: Perl
 

  1. #Method 1
  2. perl -e '@T=localtime(time-86400);printf("%2d/%2d/%4d\n",$T[4]+1,$T[3],$T[5]+1900)'
  3.  
  4. #Method 2
  5. perl -e 'use POSIX;print POSIX::strftime("%m/$d/%Y\n",localtime(time-86400))'

Report this snippet  

You need to login to post a comment.