in reply to Date String Parsing
Did you not find the documentation for Date::Manip or did you just not read it?
- DateFormat
- Different countries look at the date 12/10 as Dec 10 or Oct 12. In the United States, the first is most common, but this certainly doesn't hold true for other countries. Setting DateFormat to "US" forces the first behavior (Dec 10). Setting DateFormat to anything else forces the second behavior (Oct 12).
If you wanted a listing of all of the different formats that it supports, then you misunderstand how it works. It supports more formats than could be simply listed. If you have FUD, then test it. Or go to the secondary documentation source, the source code (I recommend both):
if (/^$D\s+$D(?:\s+$YY)?$/) { # MM DD YY (DD MM YY non-US) ($m,$d,$y)=($1,$2,$3); ($m,$d)=($d,$m) if ($type ne "US"); last PARSE;
So 01/02/03 defaults to MM/DD/YY but can be set to be DD/MM/YY. It doesn't support YY/MM/DD for that case, just YYYY/MM/DD, as is reasonable, IMHO.
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Date String Parsing (TFM)
by Limbic~Region (Chancellor) on Nov 27, 2007 at 20:43 UTC |