⭐ in reply to Convert month name to number
That works for "JANUARY", "Mar", "decemb.", "oct", and many other variants.%mon2num = qw( jan 1 feb 2 mar 3 apr 4 may 5 jun 6 jul 7 aug 8 sep 9 oct 10 nov 11 dec 12 ); print $mon2num{ lc substr($month, 0, 3) };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Answer: Convert month name to number
by RhetTbull (Curate) on Jul 11, 2001 at 00:56 UTC |