A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » General XP issues or comments
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Julian Dates



 
 
Thread Tools Display Modes
  #1  
Old October 19th 09, 10:08 PM posted to microsoft.public.windowsxp.general
Cary K
external usenet poster
 
Posts: 2
Default Julian Dates

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?
Ads
  #2  
Old October 20th 09, 12:31 AM posted to microsoft.public.windowsxp.general
DL[_3_]
external usenet poster
 
Posts: 929
Default Julian Dates

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.


"Cary K" wrote in message
...
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?



  #3  
Old October 20th 09, 01:22 AM posted to microsoft.public.windowsxp.general
Andrew McLaren[_7_]
external usenet poster
 
Posts: 64
Default Julian Dates

Cary K wrote:
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

--
amclar at optusnet dot com dot au

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 11:27 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.