The 'Equation of Time' tells you by how many minutes you need to adjust the time shown by a sundial to get it to agree with 'clock' time. This is a fascinating subject, and for a complete explanation please see Kevin Karneys website 'https://equation-of-time.info/' and the accompanying book 'The Equation of Time - AEquatio Dierum: A Journal, a Reference & a Picture Book' which is available from Amazon here.
There are several ways of calculating the equation of time. Some can give an accuracy of +/- just a few seconds, but have the disadvantage that the calculation needs to be re-done each year. The charts here use a simpler formula which is accurate to a minute or so, and will be "good enough" for most needs, and valid for many years to come.
These are all SVG images, so they will scale well. You can right click and 'Save Image as' to make a copy. You are free to use these as you wish in your own projects.
Below is the Javascript code used to calculate the values used for these charts.
/*===========================================
Helper functions for doing calculations
===========================================*/
function degToRad(deg) { return (deg / 180) * Math.PI; }
function radToDeg(rad) { return (rad * 180) / Math.PI; }
/*==================================================
Function to calculate EOT on any day of the year
==================================================*/
function calcForDayNum(dayNum) {
// calculate the rotation around the sun since the
// vernal equinox in degrees
var dayVal = (360 / 365) * (dayNum - 81);
// actual calculation
var adjustment = (9.87 * Math.sin(degToRad(dayVal * 2)))
- (7.53 * Math.cos(degToRad(dayVal)))
- (1.5 * Math.sin(degToRad(dayVal)));
// we want the amount to ADD to the sundial to get clock time
adjustment *= -1
return adjustment;
}
// using the function
for(var i=1; i <= 365; i++)
{
// get the day of year as a month and date
var date = new Date(0,0,i)
var dateText = date.toDateString().substring(4,10)
// use the calculation function
var eot_adjustment = calcForDayNum(i)
// display result
console.log(dateText, "has EOT adjustment", eot_adjustment, "minutes");
}