Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discuss TR holidays #55

Open
seyyah opened this issue Jun 24, 2017 · 3 comments
Open

Discuss TR holidays #55

seyyah opened this issue Jun 24, 2017 · 3 comments

Comments

@seyyah
Copy link

seyyah commented Jun 24, 2017

Thanks to @spaceneedle2019 for TR holidays contribution. I think that TR holidays may be calculated dynamicly. Hijri GEM (4) may help us. The GEM convert hijri to geogerian vice versa.

Ramadan and Sacrifice Feast has a pattern [1,2,3]

  • 2016 Ramadan fest (first day) is Shawwal (10), 1, 1437.
  • 2017 Ramadan fest (first day) is Shawwal (10), 1, 1438.
  • 2016 Sacrifice Feast (first day) is Dhul-Hijjah(12), 10, 1437
  • 2017 Sacrifice Feast (first day) is Dhul-Hijjah(12), 10, 1438

So my idea is

# REFACTOR
begin_of_ramadan_feast = {
  '2017' => Hijri::Date.new(1438, 10, 1).to_greo,
  ...
}

# OLD
begin_of_ramadan_feast = {
  '2017' => Date.civil(2017, 6, 25),
  ...
}

But Hijri GEM [4] have a bug [5]. After fixed, this GEM will be very helpful.

References

  1. http://www.islamicity.org/hijri-gregorian-converter/
  2. http://www.islamweb.net/emainpage/index.php?page=dateconverter
  3. http://www2.diyanet.gov.tr/DinHizmetleriGenelMudurlugu/Sayfalar/2017DiniG%C3%BCnlerListesi.aspx
  4. https://github.com/ecleel/hijri
  5. Bug: wrong conversion gre2hijri OR hijri2gre ecleel/hijri#4
@ttwo32
Copy link
Member

ttwo32 commented Jun 29, 2017

Hi @seyyah !!
Thank you for a suggestion.
I like your idea that TR holidays may be calculated dynamically.

@spaceneedle2019 and @ppeble

What's your opinion on this issue?

@ppeble
Copy link
Member

ppeble commented Jul 3, 2017

Oooh! I like this idea. I like the idea of setting up the Julian/Gregorian/Hirji. That said, I'm really going to have to think about this one...this is a bit similar to how I understand holidays in China (and other lunar calendars) work. It's a bit different than how we do things in places like the US/Canada, which is where this was written. So I need to read up and then think about how we will implement this.

Thank you for the suggestion! Keep bothering us, we are definitely thinking about it and would love to incorporate this idea. 👍

@spaceneedle2019
Copy link
Contributor

spaceneedle2019 commented Jul 3, 2017

@seyyah: The transformation from the Hijri into Gregorian calendar is a good thing. 👍

@ppeble: Keep in mind the Hebrew calendar, too. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants