varalaxmibbnl has asked for the wisdom of the Perl Monks concerning the following question:
hi monks when i run this script i will get the output and even few errors please some one help me to overcome this errors....thanks in advance...
#!/usr/bin/perl use strict; use DateTime; use DateTime::Format::Strptime; my $strp = DateTime::Format::Strptime->new( pattern => '%Y-%m-%d' ); # convert date to my $date = '2014-01-26'; my $dt = $strp->parse_datetime($date); my $dat = $dt->add(days => 0)->strftime("%Y-%m-%d"); my $rem1 = $dt->add(days => 7)->strftime("%Y-%m-%d"); my $rem2 = $dt->add(days => 14)->strftime("%Y-%m-%d"); print "$date\n$rem1\n$rem2\n$dat\n";
output when i run the script....
The am_pms method in DateTime::Locale::Base has been deprecated. Pleas +e see the DateTime::Locale distribution's Changes file for details at + /usr/share/perl5/DateTime/Format/Strptime.pm line 610. The default_date_format method in DateTime::Locale::Base has been depr +ecated. Please see the DateTime::Locale distribution's Changes file f +or details at /usr/share/perl5/DateTime/Format/Strptime.pm line 613. The default_time_format method in DateTime::Locale::Base has been depr +ecated. Please see the DateTime::Locale distribution's Changes file f +or details at /usr/share/perl5/DateTime/Format/Strptime.pm line 617. The default_datetime_format method in DateTime::Locale::Base has been +deprecated. Please see the DateTime::Locale distribution's Changes fi +le for details at /usr/share/perl5/DateTime/Format/Strptime.pm line 6 +21. The day_names method in DateTime::Locale::Base has been deprecated. Pl +ease see the DateTime::Locale distribution's Changes file for details + at /usr/share/perl5/DateTime/Format/Strptime.pm line 671. The day_abbreviations method in DateTime::Locale::Base has been deprec +ated. Please see the DateTime::Locale distribution's Changes file for + details at /usr/share/perl5/DateTime/Format/Strptime.pm line 671. The month_names method in DateTime::Locale::Base has been deprecated. +Please see the DateTime::Locale distribution's Changes file for detai +ls at /usr/share/perl5/DateTime/Format/Strptime.pm line 682. The month_abbreviations method in DateTime::Locale::Base has been depr +ecated. Please see the DateTime::Locale distribution's Changes file f +or details at /usr/share/perl5/DateTime/Format/Strptime.pm line 682. The am_pms method in DateTime::Locale::Base has been deprecated. Pleas +e see the DateTime::Locale distribution's Changes file for details at + /usr/share/perl5/DateTime/Format/Strptime.pm line 469. 2014-01-26 2014-02-02 2014-02-16 2014-01-26
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: datetime error
by vinoth.ree (Monsignor) on Feb 03, 2014 at 10:27 UTC | |
|
Re: datetime error
by kcott (Archbishop) on Feb 04, 2014 at 07:47 UTC |