in reply to Local Date Format

Could you give an example of what you want the output to look like?

Replies are listed 'Best First'.
Re^2: Local Date Format
by SmokeyB (Scribe) on Feb 22, 2005 at 18:28 UTC
    Sorry if this is causing confusion, I guess I wasn't too clear in my request.

    I'm curious to know if it is possible to detect the OS's (either window, unix, etc.) current date format (From region to region these settings will change) and apply that format to display within my scripts.

    I hope this is clear, thanks!
      This oneliner might help you find what you need... Just try it!

      perl -e "use POSIX qw(strftime setlocale LC_ALL LC_CTYPE);my ($os)=str +ftime(\"%a [%c]\", localtime); my ($loc) = POSIX::setlocale( &POSIX:: +LC_ALL,'en' ); my ($en)= strftime(\"%a [%c]\", localtime);print \"$os + \n$en\n\";" Mar [22/02/2005 21:41:46] Tue [2/22/2005 9:41:46 PM]

      %c prints the default date accepted by the local OS. Or by the LC_ALL requested. (like in 'C' programing, I have heard. So this is obvious for those programers.)