
    ihx&                     H    d dl mZ d dlmZ d dlmZ d dlmZ  G d d      Zy)    )date)Optional)_BurmeseLunisolar)
_timedeltac            
       @   e Zd ZdZddZ	 ddedee   dedee   fdZ	dede
e   fd	Zdedee   fd
Zdedee   fdZdedee   fdZ	 	 ddededede
e   fdZdedee   fdZdedee   fdZdedee   fdZdedee   fdZdedee   fdZdedee   fdZy)BurmeseCalendarHolidaysz$Burmese lunisolar calendar holidays.returnNc                 "    t               | _        y )N)r   _burmese_calendar)selfs    W/var/www/api/v1/venv_fitandmore/lib/python3.12/site-packages/holidays/groups/burmese.py__init__z BurmeseCalendarHolidays.__init__   s    !2!4    namedt
days_deltac                 H    |y|rt        ||      }| j                  ||      S )zAdd Burmese calendar holiday.N)r   _add_holiday)r   r   r   r   s       r   _add_burmese_calendar_holidayz5BurmeseCalendarHolidays._add_burmese_calendar_holiday   s.    
 :B
+B  r**r   c           	          | j                   dz
  | j                   fD ch c]1  }| j                  || j                  j                  |            x}r|3 c}S c c}w )a  Add Karen New Year holiday.

        The Karen New Year, also known as the Kayin New Year, is one of the major holidays
        celebrated by the Karen people. The Karen New Year falls on the first day of Pyatho,
        the tenth month in the Burmese calendar.
        https://en.wikipedia.org/wiki/Karen_New_Year

        Args:
            name:
                Holiday name.

        Returns:
            Set of dates of added holiday, empty if there is no holiday date for the current year.
           )_yearr   r   pyatho_waxing_moon_date)r   r   yr   s       r   _add_karen_new_yearz+BurmeseCalendarHolidays._add_karen_new_year'   sj    " jj1ndjj1
188$00HHK   1
 	
 
s   6Ac                 l    | j                  || j                  j                  | j                              S )a  Add Full Moon Day of Kason holiday.

        Vesak is known as the Full Moon Day of Kason, which is the second month
        in the traditional Burmese calendar.
        https://en.wikipedia.org/wiki/Vesak#In_Myanmar_(Burma)

        Args:
            name:
                Holiday name.

        Returns:
            Date of added holiday, `None` if there is no holiday date for the current year.
        )r   r   kason_full_moon_dater   r   r   s     r   _add_kason_full_moon_dayz0BurmeseCalendarHolidays._add_kason_full_moon_day@   s1     11$((==djjI
 	
r   c                 l    | j                  || j                  j                  | j                              S )a  Add Myanmar Diwali holiday.

        Diwali (Deepavali, Festival of Lights) is one of the most important festivals
        in Indian religions. In Myanmar, it is celebrated on first day of Tazaungmon,
        the eighth month of the Burmese calendar.
        https://en.wikipedia.org/wiki/Diwali

        Args:
            name:
                Holiday name.

        Returns:
            Date of added holiday, `None` if there is no holiday date for the current year.
        )r   r   tazaungmon_waxing_moon_dater   r   s     r   _add_myanmar_diwaliz+BurmeseCalendarHolidays._add_myanmar_diwaliR   s1     11$((DDTZZP
 	
r   c                 p    | j                  || j                  j                  | j                        d      S )a8  Add Myanmar National Day holiday.

        National Day is a public holiday in Myanmar, marking the anniversary of the first
        university student strike at Rangoon University in 1920. The date is based on
        the traditional Burmese calendar, occurring on the 10th day following
        the full moon of Tazaungmon.
        https://en.wikipedia.org/wiki/National_Day_(Myanmar)

        Args:
            name:
                Holiday name.

        Returns:
            Date of added holiday, `None` if there is no holiday date for the current year.
        
   r   r   r   tazaungmon_full_moon_dater   r   s     r   _add_myanmar_national_dayz1BurmeseCalendarHolidays._add_myanmar_national_daye   s9      11$((BB4::N[^ 2 
 	
r   extra_days_beforeextra_days_afterc           
         | j                   j                  | j                        \  }}||
t               S d|z
  }|xs ||z
  j                  dz   }t        ||      D ch c]"  }| j                  |t        ||            x}	r|	$ c}S c c}w )a  Add Myanmar New Year (Thingyan, Water Festival).

        Thingyan, also known as the Myanmar New Year, is a festival that usually occurs
        in middle of April. Thingyan marks the transition from the old year to the new one,
        based on the traditional Myanmar lunisolar calendar. The festival usually spans
        four to five days.

        https://en.wikipedia.org/wiki/Thingyan.

        Args:
            name:
                Holiday name.

            extra_days_before:
                Number of additional holiday days preceding Akya.

            extra_days_after:
                Whether to add additional holiday days following Atat.

        Returns:
            Set of dates of added holiday, empty if there is no holiday date for the current year.
        r   )r   thingyan_datesr   setdaysranger   r   )
r   r   r)   r*   akyaatatbeginenddeltar   s
             r   _add_myanmar_new_yearz-BurmeseCalendarHolidays._add_myanmar_new_yeary   s    8 ++::4::F
d<4<5L &&84$;"4"4q"8 uc*
*''ju.EFFF *
 	
 
s    'B
c                 r    | j                  || j                  j                  | j                  dz
              S )u  Add Full Moon Day of Tabaung holiday.

        Māgha Pūjā (also written as Makha Bucha Day, Meak Bochea) is a Buddhist festival
        celebrated on the full moon day of Tabaung in Myanmar.
        https://en.wikipedia.org/wiki/Māgha_Pūjā#Myanmar_(Burma)

        Args:
            name:
                Holiday name.

        Returns:
            Date of added holiday, `None` if there is no holiday date for the current year.
        r   )r   r   tabaung_full_moon_dater   r   s     r   _add_tabaung_full_moon_dayz2BurmeseCalendarHolidays._add_tabaung_full_moon_day   s5     11$((??

QO
 	
r   c                 l    | j                  || j                  j                  | j                              S )a  Add Full Moon Day of Tazaungmon holiday.

        The Tazaungdaing Festival, also known as the Festival of Lights, held on the full moon day
        of Tazaungmon, the eighth month of the Burmese calendar.
        https://en.wikipedia.org/wiki/Tazaungdaing_festival

        Args:
            name:
                Holiday name.

        Returns:
            Date of added holiday, `None` if there is no holiday date for the current year.
        r&   r   s     r   _add_tazaungmon_full_moon_dayz5BurmeseCalendarHolidays._add_tazaungmon_full_moon_day   1     11$((BB4::N
 	
r   c                 p    | j                  || j                  j                  | j                        d      S )a  Add Pre-Full Moon Day of Thadingyut holiday.

        The Thadingyut Festival, also known as the Lighting Festival of Myanmar, is held
        on the full moon day of the Burmese lunar month of Thadingyut.
        https://en.wikipedia.org/wiki/Thadingyut_Festival

        Args:
            name:
                Holiday name.

        Returns:
            Date of added holiday, `None` if there is no holiday date for the current year.
        r,   r%   r   r   thadingyut_full_moon_dater   r   s     r   _add_thadingyut_full_moon_evez5BurmeseCalendarHolidays._add_thadingyut_full_moon_eve   9     11$((BB4::N[] 2 
 	
r   c                 l    | j                  || j                  j                  | j                              S )a  Add Full Moon Day of Thadingyut holiday.

        The Thadingyut Festival, also known as the Lighting Festival of Myanmar, is held
        on the full moon day of the Burmese lunar month of Thadingyut.
        https://en.wikipedia.org/wiki/Thadingyut_Festival

        Args:
            name:
                Holiday name.

        Returns:
            Date of added holiday, `None` if there is no holiday date for the current year.
        r>   r   s     r   _add_thadingyut_full_moon_dayz5BurmeseCalendarHolidays._add_thadingyut_full_moon_day   r<   r   c                 p    | j                  || j                  j                  | j                        d      S )a  Add Post-Full Moon Day of Thadingyut holiday.

        The Thadingyut Festival, also known as the Lighting Festival of Myanmar, is held
        on the full moon day of the Burmese lunar month of Thadingyut.
        https://en.wikipedia.org/wiki/Thadingyut_Festival

        Args:
            name:
                Holiday name.

        Returns:
            Date of added holiday, `None` if there is no holiday date for the current year.
        r   r%   r>   r   s     r   !_add_thadingyut_full_moon_day_twoz9BurmeseCalendarHolidays._add_thadingyut_full_moon_day_two   rA   r   c                 l    | j                  || j                  j                  | j                              S )a  Add Full Moon Day of Waso holiday.

        Vassa is the three-month annual retreat observed by Theravada Buddhists.
        Vassa lasts for three lunar months, from the Burmese month of Waso to
        the Burmese month of Thadingyut.
        https://en.wikipedia.org/wiki/Vassa

        Args:
            name:
                Holiday name.

        Returns:
            Date of added holiday, `None` if there is no holiday date for the current year.
        )r   r   waso_full_moon_dater   r   s     r   _add_waso_full_moon_dayz/BurmeseCalendarHolidays._add_waso_full_moon_day   s1     11$((<<TZZH
 	
r   )r	   N)Nr   )r   r   )__name__
__module____qualname____doc__r   strr   r   intr   r.   r   r   r"   r(   r6   r9   r;   r@   rC   rE   rH    r   r   r   r      s\   .5 GH++%d^+@C+	$+
 
D	 
2
S 
Xd^ 
$
 
 
&
c 
htn 
. "# !	+
+
 +
 	+

 
T+
Z
s 
x~ 
$
# 
(4. 
$
# 
(4. 
$
# 
(4. 
$
c 
htn 
$
C 
HTN 
r   r   N)	datetimer   typingr   holidays.calendars.burmeser   holidays.calendars.gregorianr   r   rO   r   r   <module>rT      s      8 3}
 }
r   