On Mon, 8 Dec 2003, Doug Treder wrote: > the object should be able to use the locale it already contains; I > shouldn't have to pass it in. We already have shortcuts for ->mdy, > ->dmy, ->hms so there should be a nice little shortcut for a > locale-aware getter. The presence of the former in the documentation > might lead one to believe an if statement would be the best way to > localize this use case (m/d/y vs d/m/y).
We do already have $dt->strftime('%x') but the length of the output depends on the default date format length for the locale. AFAICT, for all locales this is currently "medium". But that's not necessarily enough. If we're going to add more methods that output localized _numeric_, they need to be well thought out. A locale_strftime method that doesn't take format specifiers is really confusing, particularly since you propose to have it just output the date, but others will want datetime, time, etc. Maybe something like: $dt->localized_date $dt->localized_time $dt->localized_datetime Each of these could accept an optional length argument. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/