Meridian cross-section of a Shashtamsa Yantra laid out for this latitude. At local noon sunlight passes through the pinhole and the Sun's image falls on the sixty-degree arc, centred on the pinhole, at the Sun's zenith distance. The image size is exaggerated.
At local noon the Sun is on the meridian, and its zenith distance z (the angle from straight overhead) is simply the difference between your latitude φ and the Sun's declination δ: z = φ − δ, with the Sun south of the zenith when δ is less than φ. A vertical gnomon of height h then casts a noon shadow of length h tan z along the north–south line. So each quantity fixes the others: measure z and you have δ = φ − z; know δ and the Sun's yearly path gives the date — two dates, one on the way north and one on the way south.
The Shashtamsa Yantra (षष्ठांश यन्त्र, "sixth-part instrument", since 60° is a sixth of a circle) at Sawai Jai Singh's Jantar Mantar in Jaipur, built in the early eighteenth century, is housed inside the masonry of the great Samrat Yantra sundial. In dark chambers a sixty-degree arc, graduated in degrees and finer divisions, stands in the plane of the meridian. A small hole above lets a beam of sunlight in; at noon the Sun's image, a bright disc, falls on the arc. Reading where its centre falls gives the zenith distance and hence the declination, and the width of the image gives the Sun's apparent diameter, which changes slightly through the year.
Declinations use the NOAA solar formulas (about 0.01°). Refraction makes the Sun appear higher, so a measured zenith distance is slightly too small; with the box ticked, the tool adds the standard refraction (about 1′ at z = 45°). A reading good to 1′ fixes the declination to 1′, which pins the date to within hours in March and September but only to several days near the solstices, when the declination barely changes.