>> I have a Date object, and I need to obtain it in a human readable format.
>> If I use date.toString(), it gives:
[quoted text clipped - 3 lines]
>> 07-01-26 17:47
>> format?
>Sigi wrote:
>>> What can I do to obtain it in the 07-01-26 17:47 format?
>This is a very non-standard date format. Why choose this particular one?
If it were 2007-01-26 17:47 it would be a fairly common format for
timestamping log entries. It has a very large advantage over other standards
in that that it's ascii-sortable so it is trivial to merge log records and
preserve temporal sequence (assuming you're using UTC as your timezone;
daylight savings can mess this up otherwise).
Dropping the century makes it suck, though, because it's then gets
confusing whether you're using this format, or the common US/Euro
shorhand m-d-y and d-m-y.
--
Mark Rafn dagon@dagon.net <http://www.dagon.net/>
Lew - 26 Jan 2007 23:02 GMT
Sigi wrote:
>> What can I do to obtain it in the 07-01-26 17:47 format?
> If it were 2007-01-26 17:47 it would be a fairly common format for
<http://en.wikipedia.org/wiki/ISO_Date_Format>
Use of the space character ' ' in lieu of the 'T' between the date and time is
widely accepted for practical use.
> Dropping the century makes it suck, though, because it's then gets
> confusing whether you're using this format, or the common US/Euro
> shorhand m-d-y and d-m-y.
or if so, which one:
07-01-26 =>
July 1, ??26 vs. 7 January, ??26.
Except that these formats really use '/' not '-'.
- Lew