Re: Date formatting



stagepin wrote:
> I receive $date in this format: yyyymmdd (For example: 20051230)
> I need to display it as "December 30, 2005"

How about using the Date::Manip module, which does nearly everything
you could ever want to do regarding time/dates:

#!/usr/bin/perl
use Date::Manip;
print UnixDate ('20051230', "%B %e, %Y");
__END__

If you want abbreviated months ('Dec' instead of 'December') use "%b"
instead of "%B". You didn't state a display preference about
single-digit days (ie, 'Dec 5' vs 'Dec 05'); this will show
single-digit days without a leading zero (use "%d" instead of "%e" if
you want leading zeros on single-digit days). See
http://search.cpan.org/~sbeck/DateManip-5.44/Manip.pod

Cheers!

.