Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Julian day
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
== Julian day number calculation ==<!-- This section is linked from [[Gregorian calendar]] --> The Julian day number can be calculated using the following formulas ([[integer division]] rounding towards zero is used exclusively, that is, positive values are rounded down and negative values are rounded up):{{efn|Doggett in Seidenmann 1992, p. 603, indicates the algorithms are inspired by Fliegel & Van Flanderen 1968. That paper gives algorithms in [[Fortran]]. The Fortran computer language performs integer division by truncating, which is functionally equivalent to rounding toward zero.}} The months January to December are numbered 1 to 12. For the year, [[astronomical year numbering]] is used, thus 1 BC is 0, 2 BC is β1, and 4713 BC is β4712. ''JDN'' is the Julian Day Number. Use the previous day of the month if trying to find the JDN of an instant before midday UT. ===Converting Gregorian calendar date to Julian Day Number=== The algorithm is valid for all (possibly [[Proleptic Gregorian calendar|proleptic]]) Gregorian calendar dates after November 23, −4713. '''Divisions are integer divisions towards zero'''; fractional parts are ignored.<ref>L. E. Doggett, Ch. 12, "Calendars", p. 604, in Seidelmann 1992. "These algorithms are valid for all Gregorian calendar dates corresponding to JD >= 0, i.e, dates after −4713 November 23."</ref> {{block indent|1=<math>\text{JDN} = \frac{1461 \cdot \left( \text{Y} + 4800 + \frac{\text{M}-14}{12} \right)}{4} + \frac{367 \cdot \left( \text{M} - 2 - 12 \cdot \frac{\text{M}-14}{12} \right)}{12} - \frac{3 \cdot \frac{\text{Y} + 4900 + \frac{\text{M} - 14}{12}}{100}}{4} + \text{D} - 32075</math>}} ===Converting Julian calendar date to Julian Day Number=== The algorithm<ref>L. E. Doggett, Ch. 12, "Calendars", p. 606, in Seidelmann 1992</ref> is valid for all (possibly [[Proleptic Julian calendar|proleptic]]) Julian calendar years β₯ β4712, that is, for all JDN β₯ 0. Divisions are integer divisions, fractional parts are ignored. {{block indent|1=<math>\text{JDN} = 367 \cdot \text{Y} - \frac{7 \cdot \left(\text{Y} + 5001 + \frac{\text{M} - 9}{7}\right)}{4} + \frac{275 \cdot \text{M}}{9} + D + 1729777</math>}} === Finding Julian date given Julian day number and time of day === For the full Julian Date of a moment after 12:00 UT one can use the following. Divisions are [[real number]]s. {{block indent|1=<math>\begin{matrix}J\!D & = & J\!D\!N + \frac{\text{hour} - 12}{24} + \frac{\text{minute}}{1440} + \frac{\text{second}}{86400}\end{matrix}</math>}} So, for example, January 1, 2000, at 18:00:00 UT corresponds to ''JD'' = 2451545.25 and January 1, 2000, at 6:00:00 UT corresponds to ''JD'' = 2451544.75. === Finding day of week given Julian day number === Because a Julian day starts at noon while a civil day starts at midnight, the Julian day number needs to be adjusted to find the day of week: for a point in time in a given Julian day after midnight UT and before 12:00 UT, add 1 or use the JDN of the next afternoon. The US day of the [[week]] '''W1''' (for an afternoon or evening UT) can be determined from the Julian Day Number '''J''' with the expression: {{block indent|1='''W1''' = [[Modular arithmetic|mod]](''J'' + 1, 7)<ref>Richards 2013, pp. 592, 618.</ref>}} {| class="wikitable" |-style="text-align:center;" !W1 | 0 || 1 || 2 || 3 || 4 || 5 || 6 |- !Day of the week |Sun||Mon||Tue||Wed||Thu||Fri||Sat |} If the moment in time is after midnight UT (and before 12:00 UT), then one is already in the next day of the week. The ISO day of the week '''W0''' can be determined from the Julian Day Number '''J''' with the expression: {{block indent|1='''W0''' = mod (''J'', 7) + 1}} {| class="wikitable" |- style="text-align:center;" !W0 | 1 || 2 || 3 || 4 || 5 || 6 || 7 |- !Day of the week |Mon||Tue||Wed||Thu||Fri||Sat||Sun |} === Julian or Gregorian calendar from Julian day number === This is an algorithm by Edward Graham Richards to convert a Julian Day Number, '''J''', to a date in the Gregorian calendar (proleptic, when applicable). Richards states the algorithm is valid for Julian day numbers greater than or equal to 0.<ref>Richards 2013, 617β619</ref><ref>Richards 1998, 316</ref> All variables are integer values, and the notation "''a'' div ''b''" indicates [[integer division]], and "mod(''a'',''b'')" denotes the [[Modular arithmetic|modulus operator]]. {| class="wikitable" |+Algorithm parameters for Gregorian calendar |- ! variable ! value ! variable ! value |- | ''y'' || 4716 || ''v'' || 3 |- | ''j'' || 1401 || ''u'' || 5 |- | ''m'' || 2 || ''s'' || 153 |- | ''n'' || 12 || ''w'' || 2 |- | ''r'' || 4 || ''B'' || 274277 |- | ''p'' || 1461 || ''C'' || −38 |} For Julian calendar: # ''f ''= '''J''' + ''j'' For Gregorian calendar: # ''f ''= '''J''' + ''j'' + (((4 Γ '''J''' + ''B'') div 146097) Γ 3) div 4 + ''C'' For Julian or Gregorian, continue: {{ordered list|start=2 |1=''e'' = ''r'' Γ ''f'' + ''v'' |2=''g'' = mod(''e'', ''p'') div ''r'' |3=''h'' = ''u'' Γ ''g'' + ''w'' |4='''D''' = (mod(''h, s'')) div ''u'' + 1 |5='''M''' = mod(''h'' div ''s'' + ''m'', ''n'') + 1 |6='''Y''' = (''e'' div ''p'') - ''y'' + (''n'' + ''m'' - '''M''') div ''n''}} '''D''', '''M''', and '''Y''' are the numbers of the day, month, and year respectively for the afternoon at the beginning of the given Julian day. === Julian Period from indiction, Metonic and solar cycles === Let Y be the year BC or AD and i, m, and s respectively its positions in the indiction, Metonic and solar cycles. Divide 6916i + 4200m + 4845s by 7980 and call the remainder r. {{block indent|1=If r>4713, Y = (r β 4713) and is a year AD.}} {{block indent|1=If r<4714, Y = (4714 β r) and is a year BC.}} Example i = 8, m = 2, s = 8. What is the year? {{block indent|1=(6916 Γ 8) = 55328; (4200 Γ 2) = 8400: (4845 Γ 8) = 38760. 55328 + 8400 + 38760 = 102488.}} {{block indent|1=102488/7980 = 12 remainder 6728.}} {{block indent|1=Y = (6728 β 4713) = AD 2015.<ref>Heath 1760, p. 160.</ref>}}
Summary:
Please note that all contributions to Niidae Wiki 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
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Julian day
(section)
Add topic