Really fix yawn

This does what d959ba1 failed to do. We always need to consider whether
the year we're jumping to is a leap year or not.

Really fixes #87.
This commit is contained in:
Steven Dee 2013-11-25 20:58:33 +00:00
parent 1e331d9bf0
commit 301b609992

View File

@ -1362,9 +1362,11 @@
=+ ney=(dec yer)
$(yer ney, day (add day ?:((yelp ney) 366 365)))
?. =(0 (mod yer 100))
$(yer (sub yer 4), day (add day 1.461))
=+ nef=(sub yer 4)
$(yer nef, day (add day ?:((yelp nef) 1.461 1.460)))
?. =(0 (mod yer 400))
$(yer (sub yer 100), day (add day 36.525))
=+ nec=(sub yer 100)
$(yer nec, day (add day ?:((yelp nec) 36.525 36.524)))
(add day (mul (div yer 400) (add 1 (mul 4 36.524))))
::
++ yelp