File Exchange

image thumbnail

Equinoxes and Solstices

version (14.2 KB) by Giuseppe Cardillo
compute the dates of equinoxes and solstices


Updated 04 Jan 2021

From GitHub

View Version History

View license on GitHub

EQNSOL computes the date of equinoxes and solstices for the input year. This is based upon the formulas given by Jean Meeus in his "Astronomical Algorithms". The date is computed in Julian Date. This function take in JD2CAL function of "Geodetic Toolbox" by Mike Craymer (ID:15285) to convert Julian Date into gregorian calendar date.

YEAR (default=current Year).
VERBOSE (default=1)
- Y=datenum formatted array.

EQ=EQNSOL(...) will stores dates in Matlab format



All dates and times are referred to GMT without DST
Spring Equinox 21-Mar-2007 00:08:28
Summer Solstice 21-Jun-2007 18:07:12
Autumn Equinox 23-Sep-2007 09:52:05
Winter Solstice 22-Dec-2007 06:08:51

Created by Giuseppe Cardillo

To cite this file, this would be an appropriate format: Cardillo G. (2007) Equinoxes and Solstices: compute the date and time of equinoxes and solstices.

Cite As

Giuseppe Cardillo (2021). Equinoxes and Solstices (, GitHub. Retrieved .

Comments and Ratings (1)

Jeff Burkey

Great function! While the level of accuracy does not affect my needs, you may want to let others know if they are in need to to the minute or second, may want to validate the results. Comparing this functions results to the US Naval Observatory, the results differ by approximately 1-minute. I'm guessing this is an artifact of matlab and complier precision. Anything dealing with astronomy and floating point precision becomes significant.

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!