Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Guild of Archivists
Search
Editing
D'ni time conversion
(section)
From Guild of Archivists
Namespaces
Page
Discussion
More
More
Page actions
Read
Edit
Edit source
History
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Algorithm 1. Gregorian Date to Julian Day Number ==== Assume a Gregorian date given as Day, Month, and Year, with optional time (on a 24-hour clock) given as Hour, Minute, and Second. All values are assumed to be integers. A. If the era of the date is BCE, convert the year to a CE year: <pre> Year = -(Year - 1)</pre> B. If the month is January or February, treat it as month 13 or 14 of the previous year. This step ensures that any leap days in the period fall at the end of a "year". <pre> if Month < 3 then Month = Month + 12 Year = Year - 1 end if</pre> C. Calculate the number of whole days (WD: an integer) that have elapsed. This is the number of days accounted for by the number of years that have passed, adjusted for leap days, plus the number of days accounted for by prior months in the current year, plus the day of the current month. <pre> WD = Day + FIX(((153 * Month) - 457) / 5) + INT(365.25 * Year) - INT(0.01 * Year) + INT(0.0025 * Year)</pre> D. Calculate fractional day (FD: a real number), if necessary. This is the time of day in seconds, expressed as a fraction of the total number of seconds in a day. If no time is included in the conversion, let FD = 0. <pre> FD = ((Hour * 3600) + (Minute * 60) + Second) / 86400</pre> E. Calculate Julian Day (JD: a real number) as: <pre> JD = WD + FD</pre>
Summary:
Please note that all contributions to Guild of Archivists may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
GoArch:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation
Navigation
Main Page
Random page
Categories
All pages
Recent changes
Resources
D'ni dictionary
Reference material
Utilities
Community
Forums
Jalak Game Directory
Projects
Apocrypha
Unexplored Branches
All projects
Contribute
Stubs
Wanted
Cleanup
Dead ends
Image requested
Help
Help
Guide
Policies
Wiki tools
Wiki tools
Special pages
Page values
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs