Julian Dates

C

Cary K

Does any know of a way to have the system date be set to that of the Julian
calendar?

We have a software package that pulls the date information from the Windows
system date and time information. Our client needs this date information to
be in a Julian date (yyyy-ddd) format, and the software's ability to auto
populate a date is limited to the system date.

Any ideas?
 
D

DL

Seems to me that there is something fundimentally wrong with the internal
coding of the software pkge, being that it relys on a sys date that is
formated in a specific way.
 
A

Andrew McLaren

Cary said:
Does any know of a way to have the system date be set to that of the Julian
calendar?

Hi Cary,

The date format you want is actually the ordinal date, although it is
often incorrectly referred to as the "Julian" date.

The Julian date, as such, is actually the number of days since a
particular day in 4,713BC (don't ask :). It is often used as a standard
way of describing time in astronomy. So 19 October 2009 is JD 2,454,466.

The Ordinal date counts the number of days in the year and is often used
in accounting applications. So 19 October 2009 is day 292 in 2009; or
2009292 in YYYYDDD form.

Internally, Windows counts time as the number of 100 nanosecond
intervals since 1 January 1601. The Windows kernel doesn't know anything
about days, weeks or years ... it only sees those 100 nanosecond ticks,
ticking away. The Windows GetSystemTime() function retrieves the current
system time and allows it to be formatted into a human-readable string
using functions like GetDateFormat(). These in turn, use a so-called
LOCALE definition to use the appropriate date format (eg Western-style
Gregorian calendar vs Japanese calendar vs Hejira calendar etc).

So, if you are writing your own program, you can call Windows functions
programmatically to format the time and date into almost any form you want.

However, the built-in user interface in Windows only uses a subset of
the total possibilities. Most major national calendars are supplied "in
the box". However, there is no built-in Locale for Ordinal dates in Windows.

This is a little bit surprising, because the ordinal date is not that
uncommon, and is quite a reasonable thing to want. I guess just not
enough people have asked loudly enough for it over the last 10 or 15 years.

Windows Vista and 7 provide a facility to create custom LOCALEs. This
*might* allow an end-user to create an ordinal date format ... but I
certainly haven't explored that in detail yet, so don't run out and buy
Vista on the strength of that! It's just an aside comment.

Converting Gregorian dates into ordinal dates is actually a very simple
programming exercise, the sort of thing you do in a first year
programming class. So maybe your customer can lean on the software
vendor to add an ordinal date feature to their application. There are
also lots of downloadable gadgets, scripts and utilities to convert the
ddmmyyyy date into a yyyyddd date. That might be a workaround (albeit,
manual).

Other folks might have extra ideas, hope this helps a bit

Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top