News for hackers. Stuff that matters.
Re:Idea for date formatting strings by defrex on Tuesday July 13, 2010 @05:28PM (#1512818)
To remove ambiguity, you could say months should be represented by December, days by the 31st, weeks by Friday, and so on. In that way it would be easy to implement and easy to write to. Then the case of "01-01-01" becomes "31-12-99", for example. Still easy to read, still easy to implement.
Re:Idea for date formatting strings by baddox on Tuesday July 13, 2010 @05:56PM (#1512911)
This removes a lot of flexibility, which is the whole point of date format strings. "31st" doesn't give you the choice to print just the number, or the number and its ordinal suffix ("-st," "-rd," etc.). Also, preferably "Friday" should stand for the day, not the week. :)
Re:Idea for date formatting strings by Ralith on Tuesday July 13, 2010 @06:29PM (#1512978)
All of the things you say can be had by doing things grandparent's way with minor tweaks.
Re:Idea for date formatting strings by baddox on Tuesday July 13, 2010 @06:40PM (#1512998)
But then you're left with essentially the standard php date format, except instead of one-letter tokens, they're all longer.
Re:Idea for date formatting strings by jacabado on Tuesday July 13, 2010 @07:38PM (#1513118)
But concrete and equal in all languages, which is the point of the OP.
Re:Idea for date formatting strings by bluesmoon on Tuesday July 13, 2010 @10:30PM (#1513397)
the strftime format is an open standard that's already the same in all languages.
Re:Idea for date formatting strings by InclinedPlane on Tuesday July 13, 2010 @05:36PM (#1512849)
I like this idea.

Pick some date that is perfectly suitable to using in an example formatted date such that the format can be inferred from the example (for all reasonable formats). I propose: 1:23:45pm, Friday, December 31st, 1999, which has the advantage of making it easy to determine whether am/pm should be used or 24h time.