Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Date manipulation

by Anonymous Monk
on Aug 28, 2012 at 06:38 UTC ( #990154=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi ,I need the perl code to find the current date and day of week.Also i need to get the dates and Day of week for all days of next week based on current date

Replies are listed 'Best First'.
Re: Date manipulation
by moritz (Cardinal) on Aug 28, 2012 at 06:46 UTC
Re: Date manipulation
by Corion (Pope) on Aug 28, 2012 at 07:13 UTC

    Have you looked at localtime (and Time::Local)? What part of your needed functionality do they fail to provide?

Re: Date manipulation
by influx (Beadle) on Aug 28, 2012 at 08:07 UTC
    Usually I tend to use DateTime, but I've recently started using Time::Piece, which overrides the default localtime() into a really useful method that returns an object. It's far more lightweight than DateTime and does most of the stuff I normally want to do anyway.
Re: Date manipulation
by Anonymous Monk on Aug 28, 2012 at 12:52 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://990154]
Approved by moritz
[LanX]: Yesterday I made B::Concise produce a nested AoH of the optree instead of text
LanX chacka!!!
[LanX]: whats the correct way to make a perlbug report for perldoc?
[erix]: chacka
[LanX]: with a diff? which perldoc version should I take from where?

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2017-04-24 15:18 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (442 votes). Check out past polls.