in reply to Re: Date String Conversion?
in thread Date String Conversion?
I don't feel good with the 20$year part, though. It reminds me of the 19100 syndrome :-)#!/usr/bin/perl use strict; use warnings; my %months = ( Jan => 1, Feb => 2, Mar => 3, # ..... ); my $str = shift; my($day, $mon, $year) = split /(\D+)/, $str; printf "%02d-%02d-%s\n", $months{$mon}, $day, "20$year";
Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Date String Conversion?
by parv (Parson) on Jun 09, 2007 at 02:12 UTC | |
by naikonta (Curate) on Jun 09, 2007 at 08:17 UTC |