1 Aug 2014 marnanel   » (Journeyer)

date format

A Gregorian date encoding I used in a personal system: I think it nicely balances human readability with brevity. It is only well-defined between 2010 and 2039.

Consider the date as a triple (y,m,d) where:
y is the year number AD minus 2010
m is the month number, 1-based
d is the day of the month, 1-based

So today, 1st August 2014, is (4,8,1).

Then define a partial mapping from integers to characters thus:
x=0 to x=9 are represented by the digits 0 to 9
x=10 to x=31 are represented by the lowercase letters a to u

Translate the date triple and concatenate.

Thus today is written 481.

Years outside the given range are written in full, e.g. 1975-01-30 -> 19751t.

Thoughts?

This entry was originally posted at http://marnanel.dreamwidth.org/307780.html. Please comment there using OpenID.

Syndicated 2014-08-01 15:00:22 from Monument

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!