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
    tye,
    Did you not find the documentation for Date::Manip or did you just not read it?

    Since I quoted from it in my post, let's assume I found it and read parts of it. I have, at one point or another, read all of the documentation. I am guilty of not spending a lot of time with the source code.

    It seems like my real crime is laziness. I am not interested in seeing a list of all the formats it supports. I am interested in a list of ambigous formats and settings to modify to specify which one to use. I want to be able to look at a table and that says if your string looks like this the module will see at as X. If you want Y then change this setting to Z. This is apparently a pipe dream.

    Cheers - L~R