Skip Menu |

This queue is for tickets about the Date-Calc CPAN distribution.

Report information
The Basics
Id: 1713
Status: resolved
Priority: 0/
Queue: Date-Calc

People
Owner: STBEY [...] cpan.org
Requestors: bdfoy [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 5.3
Fixed in: (no value)



Subject: how about a Yesterday() function?
"How do I get yesterday's date?" is a frequently asked question. I usually tell people to use something like: Add_Delta_Days( Today(), -1 ); perhaps Yesterday() could be a wrapper for that.
On Thu Oct 24 15:55:56 2002, guest wrote: Show quoted text
> "How do I get yesterday's date?" is a frequently asked question. I > usually tell people to use something like: > > Add_Delta_Days( Today(), -1 ); > > perhaps Yesterday() could be a wrapper for that.
Add sub Yesterday { Add_Delta_Days( Today(), -1 ) } to your code if you need it often and don't care about the inefficiency (otherwise cache the result).