in reply to Date function
This will give you the previous day (and roll back the month if today is the 1st).#!/usr/bin/perl use strict; use warnings; use POSIX 'strftime'; my @date = (localtime)[0 .. 5]; $date[3]--; print strftime "%Y-%m-%d", @date;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Date function
by Anonymous Monk on Aug 02, 2013 at 17:33 UTC | |
by Cristoforo (Curate) on Aug 02, 2013 at 20:24 UTC | |
by Anonymous Monk on Aug 06, 2013 at 13:14 UTC |