Questions tagged [julian-date]

Julian day is the continuous count of days since the beginning of the Julian Period used primarily by astronomers. The Julian Date (JD) of any instant is the Julian day number for the preceding noon plus the fraction of the day since that instant. The term "Julian date" also refers to the day-of-year number (more properly, the ordinal date) in the Gregorian calendar, especially in computer programming, the military and the food industry.

Julian day is the continuous count of days since the beginning of the Julian Period used primarily by astronomers.

The Julian Day Number (JDN) is the integer assigned to a whole solar day in the Julian day count starting from noon Greenwich Mean Time, with Julian day number 0 assigned to the day starting at noon on January 1, 4713 BC, proleptic Julian calendar (November 24, 4714 BC, in the proleptic Gregorian calendar). For example, the Julian day number for January 1, 2000, was 2,451,545.

The Julian Date (JD) of any instant is the Julian day number for the preceding noon plus the fraction of the day since that instant. Julian Dates are expressed as a Julian day number with a decimal fraction added. For example, the Julian Date for 00:30:00.0 UT January 1, 2013, is 2,456,293.520833.

The term "Julian date" may also refer, outside of astronomy, to the day-of-year number (more properly, the ordinal date) in the Gregorian calendar, especially in computer programming, the military and the food industry,— or it may refer to dates in the Julian calendar. For example, if a given "Julian date" is "May 12, 1629", this means that date in the Julian calendar (which is May 22, 1629, in Gregorian calendar— the date of the Treaty of Lübeck). Outside of an astronomical or historical context, if a given "Julian date" is "40", this most likely means the fortieth day of a given Gregorian year, namely February 9. But the potential for mistaking a "Julian date" of "40" to mean an astronomical Julian Day Number (or even to mean the year 40 ad in the Julian calendar, or even to mean a duration of 40 astronomical Julian years) is justification for preferring the terms "ordinal date" or "day-of-year" instead. In contexts where a "Julian date" means simply an ordinal date, calendars of a Gregorian year with formatting for ordinal dates are often called "Julian calendars", in spite of the potential for misinterpreting this as meaning that the calendars are of years in the Julian calendar system.

The Julian Period is a chronological interval of 7980 years beginning 4713 BC. It has been used by historians since its introduction in 1583 to convert between different calendars. 2014 is year 6727 of the current Julian Period. The next Julian Period begins in the year 3268 AD.

276 questions
71
votes
6 answers

How to convert Year and Day of Year to Date?

I have a year value and a day of year and would like to convert to a date (day/month/year).
Mino
  • 911
  • 1
  • 7
  • 14
43
votes
2 answers

Why does NSDateFormatter return nil date for these 4 time zones?

Try running this in iOS6 (haven't tested pre iOS6): NSDateFormatter *julianDayDateFormatter = nil; julianDayDateFormatter = [[NSDateFormatter alloc] init]; [julianDayDateFormatter setDateFormat:@"g"]; for (NSString *timeZone in [NSTimeZone…
lpa
  • 710
  • 6
  • 14
34
votes
12 answers

Convert DateTime to Julian Date in C# (ToOADate Safe?)

I need to convert from a standard Gregorian date to a Julian day number. I've seen nothing documented in C# to do this directly, but I have found many posts (while Googling) suggesting the use of ToOADate. The documentation on ToOADate does not…
cweston
  • 11,297
  • 19
  • 82
  • 107
33
votes
10 answers

Extract day of year and Julian day from a string date

I have a string "2012.11.07" in python. I need to convert it to date object and then get an integer value of day of year and also Julian day. Is it possible?
f.ashouri
  • 5,409
  • 13
  • 44
  • 52
25
votes
5 answers

Convert a date vector into Julian day in R

I have a column of dates in the format: 16Jun10 and I would like to extract the Julian day. I have various years. I have tried the functions julian and mdy.date and it doesn't seem to work.
user3166363
  • 765
  • 2
  • 7
  • 7
24
votes
9 answers

Julian day of the year in Java

I have seen the "solution" at http://www.rgagnon.com/javadetails/java-0506.html, but it doesn't work correctly. E.g. yesterday (June 8) should have been 159, but it said it was 245. So, does someone have a solution in Java for getting the current…
Mark
  • 1,988
  • 2
  • 24
  • 42
23
votes
4 answers

Convert unix timestamp to julian

How can I convert from a unix timestamp (say 1232559922) to a fractional julian date (2454853.03150). I found a website ( http://aa.usno.navy.mil/data/docs/JulianDate.php ) that performs a similar calculation but I need to do it programatically.…
bgoncalves
  • 1,687
  • 3
  • 19
  • 19
22
votes
4 answers

Convert day of year to date

How do I convert day-of-year to date? For example, what's the date for 104th day of 2004? This is the opposite of How do you convert POSIX date to day of year in R?
Tomas
  • 57,621
  • 49
  • 238
  • 373
21
votes
2 answers

Handling Julian days in C++11/14

What is the best/easiest way to deal with Julian days in C++? I want to be able to convert between Julian days and Gregorian dates. I have C++11 and C++14. Can the library help with this problem?
Howard Hinnant
  • 206,506
  • 52
  • 449
  • 577
14
votes
9 answers

What is the precise definition of JDE's Julian Date format?

I am writing code to convert from a Gregorian date to a JDE (J.D.Edwards) Julian date. Note: a JDE Julian date is different from the normal usage of the term Julian date. As far as I can work out from Googling, the definition of a JDE Julian date…
Andy Balaam
  • 6,423
  • 6
  • 34
  • 37
11
votes
3 answers

Converting a Gregorian date to Julian Day Count in Objective C

I need Objective C method for converting Gregorian date to Julian days same as this PHP method (GregorianToJD).
wod
  • 812
  • 1
  • 10
  • 23
10
votes
4 answers

Oracle Julian day of year

how can I select Julian day of year in Oracle database? I tried: select to_char(sysdate, 'J') from dual; Which gives me the number of days since January 1, 4712 BC. But I would need the number of days since 1.1. of current year.
Prmejc
  • 155
  • 1
  • 2
  • 13
9
votes
3 answers

How do I use Julian Day Numbers with the Java Calendar API?

Julian Day Numbers are a means of representing timestamps as a continuous count of days (and fractional days) since noon UTC, January 1, 4713 B.C. The Java 7 SE API does not contain support for this format. Developers who have used the SQLite…
scottb
  • 9,908
  • 3
  • 40
  • 56
8
votes
0 answers

How can I convert between a Java Date and Julian day number?

How can a Java Date be converted into a double that represents a Julian day? How can a Julian day number be converted into a Java Date? public static double dateToJulian(Date date) { GregorianCalendar calendar = new GregorianCalendar(); …
will824
  • 2,203
  • 4
  • 27
  • 29
8
votes
5 answers

Convert a Julian Date to Regular Calendar Date

How do I convert a 7-digit julian date into a format like MM/dd/yyy?
Mark Acosta
  • 81
  • 1
  • 1
  • 2
1
2 3
18 19