Add 0.5 to the Julian Date. Record the result as Z. Subtract the result by 1867216.25 and divide by 36524.25. Record the result as W. Divide W by 4 and record the result as X. For example, with the Julian date 2299160.5 adding 0.5 gives Z the value 2299161, W the value 11 and X the value 2.
Subtract X from W. Add Z plus 1 to the difference. Record the result as A. Add 1524 to A and record the sum as B. In the example A equals 2299171 and B equals 2300695.
Subtract 122.1 from B. Record the difference as D. Divide D by 365.25. Record the result as C. Subtract D from B and record the result as F. Divide F by 30.6001 and record the result as E. In the example C equals 6298, D equals 2300344, E equals 11 and F equals 336.
Subtract D and F from B. Record the result as the day of the month. Subtract either 1 or 13 from E to get a number that is less than or equal to 12. Subtract 4715 from C if the month is either January or February; otherwise subtract 4716 from C. Record the result as the year. In the example 2300695 minus 2300344 and 336 equals 15, 11 minus 1 equals 10 and 6298 minus 4716 equals 1582.
Convert the month and day for the calendar date to the absolute day in the year. For example, January 1st equals 1 and December 31st of a non-leap year equals 365.
Add leading zeros to the absolute day so that the day number is three digits. For example, 001 is January 1st and 020 is January 20th.
Write the numerical value for the year. Insert a hyphen and write the absolute day in the year. For example, October 15th is the 288th day of the year so the ISO 8601 value for the example is 1582-288.