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

Add vietnamese holidays #115

Merged
merged 26 commits into from
Jan 27, 2024
Merged

Conversation

kevinb1989
Copy link
Contributor

@kevinb1989 kevinb1989 commented Jan 19, 2024

Holidays in Vietnam According to Wikipedia:

  • New Year's Day: 01-01
  • The Day Before Lunar New Year's Eve: 12-29 in Chinese Calendar
  • Lunar New Year's Eve: 12-30 in Chinese Calendar
  • Lunar New Year Day 1: 01-01 in Chinese Calendar
  • Lunar New Year Day 2: 01-02 in Chinese Calendar
  • Lunar New Year Day 3: 01-03 in Chinese Calendar
  • Lunar New Year Day 4: 01-04 in Chinese Calendar
  • Lunar New Year Day 5: 01-05 in Chinese Calendar
  • Hung Kings' Festival: 03-10 in Chinese Calendar
  • Reunification Day: 04-30
  • Labour Day: 05-01
  • Independence Day: 09-02
  • The day before OR after Independence Day

I copied and refactored the chineseCalendar method from PR #51 to convert dates from Chinese Calendar to Gregorian one. That becomes the ChineseCalendar trait. We might need that trait for the following countries:

  • China
  • Korea
  • Malaysia (PR created)
  • Singapore (PR created)
  • Vietnam (PR created)

Copy link
Member

@Nielsvanpach Nielsvanpach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR looks good, thanks! The Trait is usable for other Countries (like Malaysia) too, I assume?

src/Countries/Vietnam.php Show resolved Hide resolved
@Nielsvanpach Nielsvanpach mentioned this pull request Jan 26, 2024
@kevinb1989
Copy link
Contributor Author

PR looks good, thanks! The Trait is usable for other Countries (like Malaysia) too, I assume?

@Nielsvanpach Thanks! And yes, that can be used by any other Asian countries that also use Chinese Calendars.

@Nielsvanpach
Copy link
Member

Thanks!

@Nielsvanpach Nielsvanpach merged commit 81f1927 into spatie:main Jan 27, 2024
3 of 9 checks passed
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

Successfully merging this pull request may close these issues.

5 participants