[JDEV] Message timestamping - hybrid format

Zoom Juice zoomjuice at yahoo.com
Sat Oct 9 17:12:12 CDT 1999

--- Steven Wagner <steven at impulse.net> wrote:
> Now that someone lays them outnext to eachother, I like the way the ISO looks
> much much better.  Cleaner.
> > <transport id="jabber:pagertransport://pager.mot.com/"
> >        recv="19991005T17:18:12"
> >        sent="19991005T17:19:02">
> >        Your Unique Caption Here
> > <transport>

Cleaner yet:

<transport id="jabber:pagertransport://pager.mot.com/"
       Your Unique Caption Here

In the example above the day is represented by a decimal day number, counting
from some arbitrary date and the time in hh:mm:ss.  The rationale is that date
calculations are complex, and are usually done wrong (trust me).  Furthermore,
the date doesn't change often... as far as eyeballing the message goes, you
only have to remember one day number per day.  Arguably easier than remembering
the day of the month, IMHO.  On the other hand, time calculations based on 
hh:mm:ss are straightforward and not so accident prone.  The hybrid format
in the example above strikes a nice balance between machine-readable and
human-readable, relatively compact, very simple to parse, and easy to do
arithmetic on.  Note that by adding colons on the right, the precision can
be increased at will.


Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

More information about the JDev mailing list