in reply to Best way to get DD.MM.YY

The obligatory DateTime solution:
DateTime->now()->strftime('%d.%m.%y')
That out of the way, let me say that either DD.MM.YY or MM.DD.YY is a crazy way of dealing with dates. Neither is sortable and the two are not distinguishable for 144 days of the year. An ISO date/time format solves this: YYYY-MM-DDTHH:MM:SS

However if all you're doing is displaying the date to a known audience who have either asked, or specified that this is the best *display* format, then go ahead.

I'd still argue however that a two-digit year is fraught with danger .. remember the Y2K bug? This is it!

Cheers!
Rick

Replies are listed 'Best First'.
Re^2: Best way to get DD.MM.YY
by samtregar (Abbot) on Dec 13, 2005 at 00:16 UTC
    Or, better yet:

    my $dmy = DateTime->now()->dmy('.');

    I discovered the mdy() method a few days ago and it's a pretty sweet time-saver. I guess dmy() would be the equivalent outside the US.

    -sam

      Thanks Sam! I'd completely forgotten the dmy & mdy methods!