psarando / shire-reckoning

A visualization of the calendars described in J.R.R. Tolkien's The Lord of the Rings Appendix D
https://psarando.github.io/shire-reckoning
17 stars 2 forks source link

Issue with leap years #7

Open mura791007 opened 1 year ago

mura791007 commented 1 year ago

Hello Paul,

I’m Alex Munoz a candidate member of Mexico Tolkiendili Association. Actually I’m working on a project where we want to integrate a calendar to our web page. So I started working with your examples from shire-reckoning site. I’m not a JS or HTML programmer even though I do more VBScript; I think I have something that is able to work for us. But I have some doubts regarding leap-years; right now all is working so good for the shire calendar except the leap-years.

If I put the June 25 2016 date it does not show the Overlithe day, I'm thinking that the issue can be something with the calendar rules I'm using these ones:

calendarRules: TolkienCalendars.GondorCalendar.RECKONING_RULES_GREGORIAN,

I will appreciate your support on this.

This is the code that I'm using now:

<!DOCTYPE html>

Calendarios de Tolkien

Sociedad Tolkiendili de México, AC.

Mostrar:



Your example:

image

My example:

image

psarando commented 1 year ago

Hello Alex,

This would be caused by the startDate: gregorianStartDate setting you are using, because you are using gregorianStartDate.setFullYear(1, 11, 21). This means leap-years will be reckoned every 4 years, with year 1 as running from Dec. 21, 1AD through Dec. 20, 2AD. That would mean the first Overlithe would be due 4 years later, in summer of 5AD, and subsequently in 2017, rather than 2016.

In order to sync up the Shire leap-years with Gregorian leap-years, you want to use gregorianStartDate.setFullYear(0, 11, 21), so that year 1 of the Shire Calendar runs from Dec. 21, 1BC through Dec. 20, 1AD.

Although, this is already the default this project uses! So you can also just eliminate the startDate: gregorianStartDate setting altogether!

The same is true for calendarRules: TolkienCalendars.GondorCalendar.RECKONING_RULES_GREGORIAN, which is also the default and can be omitted from your settings.

I hope this answers your question, and I hope my calendar project will be useful for the Mexico Tolkiendili Association website!

mura791007 commented 1 year ago

Hello Paul,

Ok I got it, let me try that. And I'm very sure that your project will help us a lot, yesterday I had a meeting with the Tolkiendili Association President and he's very excited about this. Also we talked about your great job and your webpage so we want to explore more regarding moon phases, how that affects the Tolkien calendars, etc. We know that there is a discrepancy with the Durin's day celebration because of the effect of the moon phases. So we hope to have the opportunity to establish a relationship (work meaning) with you in order to transmit all this excellent work to the Spanish speakers community here in Mexico.

Again Thank you so much for your support and I will let you know any updates regarding this project.

Best regards

P.S. Sorry for my English. I know that it is not so good. :)

El mié, 26 oct 2022 a la(s) 11:01, Paul Sarando @.***) escribió:

Hello Alex,

This would be caused by the startDate: gregorianStartDate setting you are using, because you are using gregorianStartDate.setFullYear(1, 11, 21). This means leap-years will be reckoned every 4 years, with year 1 as running from Dec. 21, 1AD through Dec. 20, 2AD. That would mean the first Overlithe would be due 4 years later, in summer of 5AD, and subsequently in 2017, rather than 2016.

In order to sync up the Shire leap-years with Gregorian leap-years, you want to use gregorianStartDate.setFullYear(0, 11, 21), so that year 1 of the Shire Calendar runs from Dec. 21, 1BC through Dec. 20, 1AD.

Although, this is already the default this project uses! So you can also just eliminate the startDate: gregorianStartDate setting altogether!

The same is true for calendarRules: TolkienCalendars.GondorCalendar.RECKONING_RULES_GREGORIAN, which is also the default and can be omitted from your settings.

I hope this answers your question, and I hope my calendar project will be useful for the Mexico Tolkiendili Association website!

— Reply to this email directly, view it on GitHub https://github.com/psarando/shire-reckoning/issues/7#issuecomment-1292341167, or unsubscribe https://github.com/notifications/unsubscribe-auth/A32FFWZHSX5JAFYDGYMH4CLWFFPUDANCNFSM6AAAAAAROICGRA . You are receiving this because you authored the thread.Message ID: @.***>

psarando commented 1 year ago

We know that there is a discrepancy with the Durin's day celebration because of the effect of the moon phases.

I recently came across a good post that summarizes how to find Durin's Day at https://thedwarrowscholar.com/2013/09/22/is-durins-day-upon-us/, and it agrees with some other sources I've read.

By that reckoning, I think today would be a good candidate for this year's Durin's Day :)