fork(1) download
  1. BEGIN { BASEDATE="2011 02 02" ; DIW="Sun" ; BEF="2"
  2. ct=BASEDATE " 00 00 00"
  3. ct=mktime(ct)
  4. while (strftime("%a",ct) != DIW) {
  5. ct-=24*60*60
  6. }
  7. ct-=BEF*24*60*60
  8. print strftime("%Y-%m-%d %a",ct)
  9. }
Success #stdin #stdout 0.01s 4276KB
stdin
Standard input is empty
stdout
2011-01-28 Fri