FAQ: Chatzos Hayom VS Chatzos Halayla (Solar Noon VS Astronomical Midnight)

The sundial on the Zoharei Chama Synagogue on a 2014 Israeli stamp
The sundial on the Zoharei Chama Synagogue as it appears on a 2014 Israeli stamp.

Question:

Is there a difference in time between the zmanim of chatzos hayom and chatzos halayla (astronomical midnight and astronomical high noon / midday) besides the obvious 12-hour difference?

Answer:

I was recently asked by a developer why the KosherJava zmanim library does not have distinct calculations for chatzos halayla. The answer is that the zmanim API does indeed have the getSolarMidnight() calculation, but for the most part there is no real need for it. The time of chatzos halayla / midnight or chatzos hayom (solar transit / solar noon or midday) stays pretty constant from day to day. In the worst case (around December 22), a solar day, measured from noon to noon, is about 30.16 seconds longer than 24 hours. This does not change by location, but is the same anywhere in the world. This means that chatzos halayla can differ by at most about 15.08 seconds from midday + 12 hours, something that should not really impact people. In addition, the developer in question does not even show seconds, making this a moot point. In short, chatzos on any given day should be considered accurate enough for both chatzos hayom and chatzos halayla of that day. It should be noted that the Mishnah Berurah, quoting a number of achronim, and the Shulchan Aruch Harav are of the opinion that chatzos halayla is exactly 12 hours after chatzos hayom. The Mishnah Berurah states in הלכות הנהגת אדם בבקר א׳ ט׳

וזמן חצות הוא תמיד באמצעות הלילה ממש בכל מקום ואפילו בלילות הארוכות או הקצרות והיא י״ב שעות אחר חצי היום …

and the Shulchan Aruch Harav in הלכות השכמת הבוקר א׳ ח׳ states that

וזמן חצות לילה הוא שוה בקיץ ובחורף לעולם י״ב שעות אחר חצי היום שהוא אמצע הלילה ממש …

Chatzos Halayla on the Seder Night

MatzosThe time of year that the zman of chatzos has the greatest impact is during the Pesach seder, when people want to finish the afikoman before chatzos. At this time of the year, solar days are slightly shorter than 24 hours, so chatzos halayla is slightly earlier than chatzos hayom + 12 hours. The difference in the length of the solar day from solar noon on erev Pesach to solar noon on the first day of Pesach ranges from 11 to 18 seconds depending on the year[1]. This 5.5 to 9 second difference in the time of chatzos hayom vs. chatzos halayla on erev Pesach has almost no real-world impact.

Equation of Time (EoT)

You may have expected that the longest day of the year, the summer solstice (June 20 or 21 depending on the year), would be the day with the earliest sunrise / netz (or hanetz) and latest sunset / shkiah (and therefore the day with the latest start of Shabbos). However, the earliest sunrise actually occurs on or about June 14 (at latitude 40°; it varies slightly with latitude), a week before the longest day, and the latest sunset occurs on or about June 28, a week after the summer solstice. As mentioned above, the length of the day that we know to be exactly 24 hours on a clock is actually only an average over the year. The length of the day varies slightly from day to day, from a minimum of 23 hours, 59 minutes and 38.64 seconds around September 17 to a maximum of 24 hours and 30.16 seconds around December 22, measured from the previous day’s noon. The accumulated difference is known as the equation of time. While the day starts shortening after the solstice, solar days at this time of the year are slightly longer than 24 hours, so chatzos (and by extension the entire day) moves slightly later each day, resulting in the day ending later despite it being shorter.

Note: The rest of the article is somewhat technical and can be skipped if you have no interest in detailed explanations as to why days differ in length.

The variation has two main causes[2].

The Tilt of Earth’s Rotational Axis

The tilt of Earth’s rotational axis (also known as the axial tilt or the obliquity of the ecliptic), compared to the plane of its orbit around the sun, is one factor that impacts the length of the solar day. To understand this, note that Earth rotates on its axis in 23 hours 56 minutes and 4.1 seconds in relation to the stars. This is called a sidereal day. The remaining 3 minutes and 55.9 seconds, or about 0.98° of rotation, must be made up every Earth day. Due to the 23.44° axial tilt, this 3 minutes and 55.9 seconds is only an average.

The sun's path through the sky during the March equinox. The equatorial grid is blue, the ecliptic grid is orange and the ecliptic (the sun’s apparent path) is yellow.
The sun’s path through the sky during the March equinox. The equatorial grid is blue, the ecliptic grid is orange and the ecliptic (the sun’s apparent path) is yellow.

During the equinoxes, Earth’s 23.44° tilt results in the sun having to travel slightly farther (1.09° for every 1° of eastward travel) to cover a line of longitude, since its path is angled and moving slightly north or south as it travels west. This results in the day being slightly shorter, since the sun only travels about 0.9° along the equator, as opposed to the average of 0.98° per day.

The sun’s path through the sky during the December winter solstice. The equatorial grid is blue, the ecliptic grid is orange and the ecliptic (the sun’s apparent path) is yellow
The sun’s path through the sky during the December winter solstice. The equatorial grid is blue, the ecliptic grid is orange and the ecliptic (the sun’s apparent path) is yellow.

In the winter and summer, the sun’s path is parallel to the equator, running directly east to west. In addition, since the lines of longitude are closer together at 23.44° from the equator, the sun travels farther, moving 1.09° parallel to the equator for every 1° of eastward travel. This results in a slightly longer day[3].

The Elliptical Orbit of Earth

The elliptical orbit of Earth (or the eccentricity of Earth’s orbit) is the second factor that impacts the length of the day. Earth’s orbit around the sun is an ellipse and not a perfect circle. Following Kepler’s second law, Earth moves slightly faster in its orbit when it is closer to the sun, and slower when it is farther away. Earth is closest to the sun at perihelion (between January 2 and 5, depending on the year), when it moves fastest, and farthest away at aphelion (between July 3 and 7), when it moves slowest[4]. As a result, the sun’s apparent angular velocity (in relation to the stars) is faster when Earth is closer to it. Despite it being somewhat counterintuitive, the sun is closer to Earth in the middle of the northern hemisphere’s winter than during the summer. This non-uniform orbital speed impacts the length of the solar day.

The Accumulated Difference

equation of time (EoT) analemmaThis difference between our standard clock time and the time that would be based on the exact position of the sun in the sky accumulates, and is referred to as the equation of time (EoT)[5]. Adding or subtracting this time allows us to sync solar time and clock time (mean solar time / universal time).
Please see the references section below for links that cover the topic in detail.

Note: This article is explained using a heliocentric model. I would appreciate it if my readers who follow the geocentric model would post a detailed explanation of this article based on that view.
Thank you.

References

I would like to thank my son Shai for the detailed work on the technical part of this article.


Notes

  1. ^ The 11-second difference is on the very late erev Pesach of April 24, which last occurred in 1929 and 1967 and will next occur in 2043 and 2062. The 18-second difference is on the extremely early erev Pesach of March 25, which occurred in 1899 and 2013 and will next occur in 2089 (see Rabbi Dovid Heber’s Why is This Pesach the Earliest Since 1899?). Because the average Jewish year is slightly longer than the average solar year, a March 25 erev Pesach will never happen again after 2089.
  2. ^ The effects of nutation (such as the Chandler wobble), axial precession and other factors are too small to make a practical difference in the EoT calculations.
  3. ^ A technical and detailed explanation can be found in Mike G’s explanation of the subject on Astronomy Stack Exchange, the source of the Stellarium-generated images above, and in Art Carlson’s equation of time explanation.
  4. ^ At perihelion, Earth is 91,402,500 mi / 147,098,070 km from the sun and travels at 30.287 km/s; at aphelion, it is 94,509,100 mi / 152,097,700 km away and travels at 29.291 km/s.
  5. ^ “Equation” in this case refers to equality and not a mathematical equation, though the calculations certainly involve mathematical equations.

FAQ: Zmanim and Leap Seconds

Leap Second

Questions:

Answers:

  • Yes
  • Yes, but infinitesimally

Before delving into the answer, I would like to note that zmanim accuracy / precision down to the second that are supported by the API are really nonsense, because variations in refraction make this accuracy pointless. The second (or millisecond) zmanim accuracy / precision subject will hopefully have its own article in the future.
Since 1972, 27 leap seconds have been added to UTC time VS International Atomic Time (TAI). This is in addition to the initial 10 seconds added in 1972 to reflect pre-1972 corrections. The reason for adding leap seconds is to correct our clocks for incorrect original estimates of the speed of earth’s rotation. Assuming that you keep your clock time correct (and add the leap seconds), no change in any zmanim calculations by either the KosherJava zmanim library, or any other zmanim programs or APIs are needed. However, if you have a very accurate clock, and did not change it since 1972, your zmanim calculations will be off by 37 seconds. This is not something any zmanim APIs, apps or programs should have to deal with. Had we added any corrections for leap seconds, your zmanim calculations would be inaccurate.
As far as the Tōhoku earthquake in Japan, this is really the same question as the first question. Yes, that earthquake slowed down earth’s rotation by 1.8 microseconds or 1.8 millionth of a second (meaningless for zmanim). This as well as the impact of other earthquakes that impact earth’s rotation are factored into the leap second calculations that “correct” the time of our clocks and ensure that your zmanim are correct.

Technical Details

The leap second corrections address incorrect clock time that result from a slower earth rotation than expected. To get a drop more technical (thank you Pinny Markowitz), when the rate or the angle of rotation changes (due to earthquakes or other natural or man-made changes such as building of the Three Gorges Dam), the changes are minuscule. These small changes as well as the original incorrect calculation of the length of the day add up over time. On occasion (about every 2 years) the accumulated difference is significant enough to warrant introducing (or theoretically removing, something that has yet to happen) a leap second to reconcile our clocks with the natural one. On any given day, UTC time always considers 86,400 (60 * 60 * 24) seconds as a day. On the day with a leap second, UTC time still considers the day as having only 86,400 seconds, but a second is added to account for each of the seconds over a year or more being a drop too short. There are various ways of making system clocks conform with the UTC standard, but the net effect is always the same, an extra second is added. UTC doesn’t view a second the same way that the atomic clocks (International Atomic Time) do. UTC views a second as 1/86,400 of a relative day (that is actually 86,400.002 seconds long on average), while, atomic clocks count a day as 86,400 fixed length seconds. Fortunately, the approach of adding leap seconds is exactly what we need when calculating zmanim. By ignoring leap second events in zmanim code, and instead focusing on the measurements of a relative day, we can yield calculations that will be correct in the context of a relative day (assuming that you properly adjust your clock).

ZIP Codes and Zmanim – Use With Care

99557 ZIP code area (the largest in the USA)
99557 ZIP code area (the largest in the USA)

There are many zmanim services and apps that use ZIP codes as a location finder for calculating zmanim. While very convenient, there is a potential pitfall in using ZIP codes for geolocation. In general, ZIP code geolocation services will provide the center of the ZIP code and zmanim apps calculate zmanim for that location. The issue arises with large ZIP code areas mostly found in rural areas. Take the following two extreme cases that have very large ZIP code areas. ZIP code 89049 for rural Tonopah, NV, is 195 km (121 mi) from east to west. The eastern boundary of this non-contiguous ZIP code has a longitude of -115.417°, while the western boundary is -117.625°. This means that there are 2.2° of longitude between the eastern and western borders of this ZIP code. The earth rotates 1° every 4 minutes, so zmanim at the eastern and western edges of this ZIP code are approximately 8.8 minutes apart. Using the typical center-of-the-ZIP-based calculations would mean that zmanim would be about 4.4 minutes different at the edges compared to the center. Moving to something a bit more extreme is the case of ZIP code 99557 of Aniak, Alaska and its surrounding area. This ZIP code is 415 km (258 mi) from east to west. The longitude of the eastern edge of the ZIP code is -153.032°, and the western edge is -160.783°. Being farther north and therefore having shorter distances between degrees of longitude, this ZIP code stretches across 7.7° of longitude. The zmanim difference from the center to the edges of this ZIP code is 15 and a half minutes (31 minutes across the ZIP code). While it is indeed rare to have such large distances, there are 193 US ZIP codes that are over 1° of longitude wide, meaning that the zmanim for these ZIP codes are at least 4 minutes apart, or 2 minutes off from the center. There are 1,463 or 4.4% of all ZIP codes with 0.5° or greater distance between east and west (a minimum of a 2-minute zmanim difference between the east and west side of the ZIP code). Zmanim software developers should be aware of this, and take care to alert users of possible inaccuracies when using large ZIP code areas, or require addresses or more specific location information for large ZIP codes.
Let’s contrast the above with Lakewood, NJ. With 0.107° of longitude from east to west, zmanim are about 26 seconds later on the west side (the intersection of New Central Ave & N Hope Chapel Rd) than the east side (Shinn Cranes, 1600 Ocean Ave). New York City is larger, and from the western edge of Staten Island to Glen Oaks, the eastern edge of Queens, there is a difference of 2 minutes and 11 seconds in zmanim.
See the Calculation of Zmanim VS Other Sites post for additional related material.
I thank Avraham David Gelbfish for generating the ZIP code longitude range for all 33,093 ZIP codes from the US Census Bureau ZIP code shape files.

The Novaya Zemlya Effect’s Impact on Zmanim

Mock mirage of the setting sun near San Francisco
A mock mirage of the setting sun near San Francisco, a weaker relative of the Novaya Zemlya effect (Credit: Mila Zinkova / Brocken Inaglory)

You may have seen disclaimers on zmanim calendars warning of up to a 2-minute inaccuracy due to weather and atmospheric conditions. Atmospheric refraction from the earth’s atmosphere causes the sun to be visible on average about 3 minutes earlier at sunrise, and about 3 minutes later at sunset (compared to a vacuum) due to the atmosphere bending the sunlight upwards towards the viewer. The 3 minutes is only an average, and it can swing widely due to weather and atmospheric conditions. The typical variance caused by “non-average” atmospheric conditions would usually be within 2 minutes, resulting in the 2 minutes mentioned in the disclaimers. This 2-minute variance is during usual conditions, though there are conditions that would greatly increase this time.

Refraction Explained

Refraction at Sunset
Refraction at Sunset

When the sun’s rays traveling through the vacuum of space hit the earth’s atmosphere, they slow down and bend upwards towards the observer resulting in the sun being visible earlier (than in a vacuum) in the morning, and later at sunset.

Straw appearing to be bent due to refraction
Straw appearing to be bent due to refraction

Refraction of the sun’s rays is not a one-stage refraction, but as the sun passes through increasingly dense layers of atmosphere, the amount of refraction increases with each thicker layer. This can be seen in the diagram of refraction at sunset above. The apparent position of the sun near sunset in the image (exaggerated in the image) is the height of the sun as it appears to the observer, though in reality the sun is below the horizon. Refraction can easily be observed by looking at a straw in a partially filled glass. The straw appears to bend (or be broken) at the point it enters the water. This is due to increased refraction in water versus air.

Complexity in Calculating Refraction

Since the amount of refraction depends on the pressure (the denser the atmosphere is, the greater the refraction), temperature (hot air is less dense and refracts less) and to a lesser degree humidity (water vapor in the air impacts the refraction) in each layer of the atmosphere, calculating refraction is complex and requires very detailed meteorological information on the current conditions in each layer of the atmosphere in the area being computed. This can’t be done accurately in advance, and even calculations for the current day require readings from weather balloons at multiple elevations for accurate measurement, something not very practical (though the BMG Lakewood vasikin minyan and likely other minyanim as well manually adjust the hanetz hachama time each morning based on the weather). For this reason, zmanim (as well as civil sunrise and sunset) calculations usually use a global average refraction of 34′ of a degree, or 0.5666°. The global average atmospheric refraction accounts for sunrise being between 3:01 minutes earlier (during the solstice), and 2:29 minutes earlier (during the equinox) in Yerushalayim, as opposed to the value in a vacuum (the difference depends on where in the world you are, in Lakewood, NJ the range is 3:29 – 2:57). This average atmospheric refraction is not very accurate but is commonly used since it is complex to calculate local averages. More accurate refraction figures can be calculated for local and seasonal atmospheric models, and these have been shown to be accurate to within 15 seconds 90% of the time in the case of summer and winter subtropical models used in a study in Israel. See Using a Digital Terrain Model to Calculate Visual Sunrise and Sunset Times by Rabbi Chaim Keller and Dr. John K. Hall for additional details.

Inversion and the Novaya Zemlya Effect

Under usual conditions, the atmosphere gets colder at elevation, with the warmest air being closest to earth. An inversion condition is where there is a layer of cold air under a layer of warmer air. When there is an inversion over a large area (greater than 400 km), the solar rays get ducted in the lower colder air layer (see image below) and produce an extreme refraction. This is known as the Novaya Zemlya effect and produces a solar mirage resulting in the somewhat visually distorted sun being visible much earlier than expected. A weaker inversion produces a related distortion known as a mock mirage (see top image).

Novaya Zemlya effect refraction diagram
Novaya Zemlya Effect Refraction Diagram

While typically a phenomenon in the polar regions, a study by the University of Calgary showed that refraction can have a significant effect on zmanim even in non-polar areas. In the 2003 study (Variability in the Astronomical Refraction of the Rising and Setting Sun), they observed that the sunrise on January 10, 1991 appeared almost 12 minutes earlier than expected. The paper mentions:

On rare occasions, the Sun appeared to rise much earlier or set much later than predicted by such publications as the Tables of Sunrise, Sunset, and Twilight (USNO 1962). In our study, the sunrise of 1991 January 10 was almost 12 minutes early. This phenomenon is known as the Novaya Zemlya solar mirage (Lehn 1979). It appears to be caused by a geographically extensive temperature inversion within the boundary layer of the atmosphere. The resulting vertical density profile causes the sunlight to be ducted around the curvature of the Earth. For the purpose of this study, we defined anomalously large astronomical refraction to be an event with refraction greater than 1°. A total of 12 anomalous events were recorded (2.9%).

While these typically occur in cold areas, they can happen in other areas as well. The study authors mention that

The majority of the anomalous events took place in the cold months. Nine of the 12 events occurred between November 1 and April 30, with January having five events. At the time of the events, the average surface temperature was -10.9°C, and all events occurred with surface-inversion conditions. Surface inversions tend to form with overnight surface radiative cooling through a dry atmosphere. Typically, they persist into the early morning, even after sunrise. Even though most of the events took place in the cold parts of the year, the data suggest that the Novaya Zemlya solar mirage may not be an exclusively cold-weather or polar phenomenon. Four of the events occurred with a surface temperature greater than 0°C. One event took place 2 days after the summer solstice.

Refraction at Sunrise VS Sunset

The University of Calgary study found that extreme refraction is an order of magnitude more common at sunrise than sunset. The authors suggest a reason for the difference:

This may be because the lower atmosphere is better mixed during the day as a result of solar heating leading to a dry adiabatic lapse rate in the boundary layer. Anomalously large astronomical refraction events the “Novaya Zemlya solar mirage” occurred about 3% of the time and were an order of magnitude more common at sunrise than sunset.

That said, related inversion mirages do occur at sunset and in warm climates, as seen in this video of an unusual sunset mirage in San Francisco by Mila Zinkova, caused by multiple inversion layers. Sadly, the video does not include information on how long it delayed sunset.

Halacha

Halachically sunrise and sunset times depend on when we can see the sun, and not when it is at the horizon. As mentioned above, the average global refraction of 34′ results in sunrise appearing about 3 minutes earlier and sunset 3 minutes later than in a vacuum, and this refraction (or other similar refraction values) is what is used in all calendars (both halachic and civil). The fact that there is such potential for variation in weather conditions, and that the global average is likely not what is present where the zmanim are being calculated, is the reason that many luchos (zmanim calendars) have disclaimers about accuracy. Many calendars round off their zmanim without showing seconds due to the inability to accurately calculate zmanim because of refraction variations. Lahalacha the impact of earlier or later sunrise is limited to vasikin minyanim. A separate article may be needed to actually discuss the relation of sof zman krias shema and other zmanim to sunrise and sunset VS the actual position of the sun in the sky (1/4 of the way across its path for sof zman krias shema). The halachic impact of refraction at sunset is much greater since it impacts the day/night boundary, but those are much rarer.
Now to the big question: does extreme refraction such as the Novaya Zemlya effect impact zmanim? The fact that it rarely impacts sunset means that it is almost academic since predicting the inversion before a vasikin minyan starts is impractical. In a conversation with one posek a number of years ago, he felt that the Novaya Zemlya effect should not impact zmanim lahalacha due to the fact that unusual occurrences should not be factored in, and because the distorted sun is not considered the sun as far as zmanim. I would appreciate being notified if anyone receives a psak halacha on this question.

FAQ: How do I Calculate the Jewish/Hebrew Date for …?

Sunrise Calendar

Note: This FAQ is now obsolete. Jewish calendar calculations are now supported. See the Zmanim API 1.3.0 release announcement.

Question:

How do I get the Jewish date for … using the Zmanim API?

Answer:

The current version of the Zmanim API does not support Jewish calendrical calculations. Zmanim are almost exclusively based on the solar calendar, so for example, the sunrise on February 8th this year in Montreal (or any other date and location) will be almost the same every year. For this reason there was little point (as far as zmanim) to support Jewish date calculations in the API. One of the only zmanim to rely on a Jewish date is the sof zman Kiddush Levana calculation, though there are some opinions that it is purely molad based, and this can be calculated without a Jewish calendar component to the API. This zman is obviously not currently implemented in the Zmanim API. I am currently working on adding Jewish date support to the API. The code is based on Avrom Finkelstein‘s no longer active HebrewDate project. I refactored a lot of the code and fixed a number of bugs. Anyone interested in alpha testing this code can download the latest Zmanim code.

I mentioned that it “will be almost the same every year” and this is due to the approximate 1/4 day drift between the 365-day calendar year and the approximately 365.25 days actually present in the astronomical year, a discrepancy corrected every leap year. A future FAQ (probably a few of them) may delve specifically into this drift as well as general zmanim accuracy issues in detail.

If you are simply looking to convert a Hebrew date to Gregorian or Gregorian to Hebrew online without the API, try the JewishGen calendar conversion tools.