
    x7#h                         d dl m Z d dlmZ d dlmZmZmZmZm	Z	m
Z
 d dlmZmZmZ d dlmZmZmZmZ  G d deeee      Z G d d	e      Z G d
 de      Z G d de      Z G d d      Zy)    )gettext)Union)APRMAYJUNJULSEPDEC)ChristianHolidaysInternationalHolidaysStaticHolidays)ObservedHolidayBaseMON_TO_NEXT_TUESAT_SUN_TO_NEXT_MONSAT_SUN_TO_NEXT_MON_TUEc                        e Zd ZU dZdZdZ ed      ZdZe	e
d   e
edf   f   ed<   d	d
dddZdZdZdZ fdZddZ fdZd Zd Zd Zd Z xZS )UnitedKingdoma  United Kingdom holidays.

    References:
        * <https://en.wikipedia.org/wiki/Public_holidays_in_the_United_Kingdom>
        * <https://archive.org/details/treatiseonbanki00walk/page/334/mode/2up>
        * <https://www.gov.uk/bank-holidays>
        * <https://www.timeanddate.com/holidays/uk/>

    The Anniversary of the Battle of the Boyne bank holiday is proclaimed annually by the
    Secretary of State for Northern Ireland.

    In-Lieu observance was first provided in the Bank Holidays Extension Act 1875.
    GBen_GBz%s (observed))ENGNIRSCTWLS .subdivisionsr   r   r   r   )EnglandzNorthern IrelandScotlandWales)r   en_USth)UKiP  c                     t        j                  |        t        j                  |        t        j                  | t               |j                  dt               |j                  dd       t        |   |i | y )Nobserved_ruleobserved_sinceiS  )r   __init__r   r   UnitedKingdomStaticHolidays
setdefaultr   super)selfargskwargs	__class__s      a/var/www/api/v1/venv_getwork_v1/lib/python3.12/site-packages/holidays/countries/united_kingdom.pyr%   zUnitedKingdom.__init__>   sd    ""4(&&t,&AB/+>?*D1$)&)    c                    | j                  t        d             | j                  dk\  r<t        d      }| j                  dv r| j                  |       n| j	                  |       | j                  dk\  rct
        dft
        dft
        dfd}t        d	      }| j                  |v r | j                  ||| j                            y | j                  |       y y )
NzGood Fridayi  zMay Day>               )      zSpring Bank Holiday)_add_good_fridaytr_year_add_holiday_may_8_add_holiday_1st_mon_of_mayr   _add_holiday_add_holiday_last_mon_of_may)r)   namespring_bank_datess      r-   _populate_public_holidaysz'UnitedKingdom._populate_public_holidaysG   s    b/0::i=Dzz\)''-006::AhAhAh! +,Dzz..!!$(9$**(EF11$7 r.   c                 l   | j                   dk7  r| j                  dk\  r)| j                  | j                  t	        d                   | j                  | j                  t	        d            t               | j                  | j                  t	        d            t               t        | %          y )Nr   i  New Year's DayChristmas Dayrule
Boxing Day)
subdivr:   _add_observed_add_new_years_dayr9   _add_christmas_dayr   _add_christmas_day_twor(   _populate_subdiv_holidays)r)   r,   s    r-   rM   z'UnitedKingdom._populate_subdiv_holidays`   s    ;;%zzT!""4#:#:2>N;O#PQ''?(;<,   ++B|,<=,   	)+r.   c                     | j                  t        d             | j                  dk  r| j                  t        d             | j                  dk\  r| j	                  t        d             y y NEaster Monday  Whit Mondayr2   Late Summer Bank Holiday_add_easter_mondayr9   r:   _add_whit_monday_add_holiday_last_mon_of_augr)   s    r-   $_populate_subdiv_eng_public_holidaysz2UnitedKingdom._populate_subdiv_eng_public_holidayst   Y    ? 34::!!"]"34::--b1K.LM r.   c                    | j                   dk\  r)| j                  | j                  t        d                   | j	                  t        d             | j                   dk  r| j                  t        d             | j                  | j                  t        d                   | j                   dk\  r| j                  t        d             y y )	Nio  zSaint Patrick's DayrP   rQ   rR   zBattle of the Boyner2   rS   )r:   rI   _add_holiday_mar_17r9   rU   rV   _add_holiday_jul_12rW   rX   s    r-   $_populate_subdiv_nir_public_holidaysz2UnitedKingdom._populate_subdiv_nir_public_holidays   s    ::t77;P8QRS 	? 34::!!"]"34 	433B7L4MNO::--b1K.LM r.   c                 p   | j                  t        d            }| j                  | j                  t        d            t        t
        z          | j                  |       | j                  t        d             | j                  dk\  r)| j                  | j                  t        d                   | j                  | j                  t        d            | j                  dk\  rt        nt               | j                  dk\  r0| j                  | j                  t        d	            t               y y )
NrC   zNew Year HolidayrE   zSummer Bank Holidayi  zSaint Andrew's DayrD   i  rG   )rJ   r9   rI   _add_new_years_day_twor   r   _add_holiday_1st_mon_of_augr:   _add_holiday_nov_30rK   r   rL   )r)   jan_1s     r-   $_populate_subdiv_sct_public_holidaysz2UnitedKingdom._populate_subdiv_sct_public_holidays   s   ''+;(<=''+=(>?(?: 	 	

 	5! 	((,A)BC::t77;O8PQR##B$78,0JJ$,>(DW 	 	
 ::++B|,<=,   r.   c                     | j                  t        d             | j                  dk  r| j                  t        d             | j                  dk\  r| j	                  t        d             y y rO   rT   rX   s    r-   $_populate_subdiv_wls_public_holidaysz2UnitedKingdom._populate_subdiv_wls_public_holidays   rZ   r.   )returnN)__name__
__module____qualname____doc__countrydefault_languager9   observed_labelr   r   tuplestr__annotations__subdivisions_aliasessupported_languages_deprecated_subdivisions
start_yearr%   rA   rM   rY   r^   rd   rf   __classcell__)r,   s   @r-   r   r      s     G(N7L%b	5c?23  !	 3&J*82,(
NN&>
Nr.   r   c                       e Zd Zy)r!   Nrh   ri   rj   r   r.   r-   r!   r!          r.   r!   c                       e Zd Zy)r   Nrx   r   r.   r-   r   r      ry   r.   r   c                       e Zd Zy)GBRNrx   r   r.   r-   r|   r|      ry   r.   r|   c                       e Zd Zed ed      fed ed      fed ed      fed ed      fed ed	      fed
 ed      fed ed      fed ed      ffe	d ed      fdZ
y)r&      zSilver Jubilee of Elizabeth II   zWedding of Charles and Diana   zMillennium Celebrations   zGolden Jubilee of Elizabeth IIz Wedding of William and Catherine   zDiamond Jubilee of Elizabeth IIz Platinum Jubilee of Elizabeth II   z#State Funeral of Queen Elizabeth II   zCoronation of Charles III)i  i  i  r5   i  r6   r7   i  N)rh   ri   rj   r   r9   r   r
   r   r	   r   special_public_holidaysr   r.   r-   r&   r&      s     Ar:;<B9:;B456Ar:;<B=>?Ar;<= !R:;<"b>?@	
 Ar567)r.   r&   N)r   r9   typingr   holidays.calendars.gregorianr   r   r   r   r	   r
   holidays.groupsr   r   r   holidays.observed_holiday_baser   r   r   r   r   r!   r   r|   r&   r   r.   r-   <module>r      sl    "  E E T T bN'):<QSa bNJ	 		 		- 	 r.   