+
    ŒvjV  ã            	       ó¶  € R t RtR.tRt. R/Ot. R0OtRt]P                  4       P                  4       t	]P                  4       tRt
]
P                  4       P                  4       t]
P                  4       t
^ RIt^ RIt^ RIt^RIHt ]! ]R4      '       d   ]]]P(                  3tM]]3t]P,                  ! R]P.                  ]P0                  ,          4      t]P,                  ! R	4      tR
 tR tR tR tR t ! R R] 4      t! ! R R4      t"R t#R t$R t%R t&R t']#! 4       t(]"t)])! R4      t*R1t+ ! R R]"4      t,]-R8X  Ed›   ]"! 4       t.]/! R4       ]/! R].: R].Pa                  4       : R].Pc                  4       : 24       ].^,
          t2]/! R ]2Pa                  4       : R]2Pc                  4       : 24       ].^,           t3]/! R!]3Pa                  4       : R]3Pc                  4       : 24       ]/! R"]3]2,
          ,          4       ]/! ].Pi                  R#4      4       ]/! ].Pi                  R$4      4       ]/! ].Pi                  R%4      4       ]/! ].Pi                  R&4      4       ]/! ].Pi                  R'4      4       ]/! ].Pi                  R(4      4       ]/! ].Pi                  R)4      4       ]/! ].Pi                  R*4      4       ],! R+4      t5]/! R,]5R-]5Pm                  4       4       R# R# )2z3.3.18zXJeff Bauer's lightweight date class, extended by us.  Predates Python's datetime module.i$- z8Monday Tuesday Wednesday Thursday Friday Saturday SundayzeJanuary February March April May June
                July August September October November DecemberN)ÚisStrÚstruct_timez\{(m{1,5}|yyyy|yy|d{1,4})\}z(\d\d\d\d|\d\d)-(\d\d)-(\d\d)c                  ó   € \         # ©N)Ú_monthNameLower© ó    Ú\/var/www/html/daimler-pipeline/venv/lib/python3.14/site-packages/reportlab/lib/normalDate.pyÚgetStdMonthNamesr
   '   s   € ÜÐr   c                  óL   € \        4        U u. uF  q R ,          NK  	  up # u up i ©ºNé   N)r
   ©Úxs    r	   ÚgetStdShortMonthNamesr   *   s#   € Ü+Ô-Ó.Ñ-�aˆb�EˆEÑ-Ñ.Ð.ùÒ.ó   �!c                  ó   € \         # r   )Ú_dayOfWeekNameLowerr   r   r	   ÚgetStdDayNamesr   -   s   € ÜÐr   c                  óL   € \        4        U u. uF  q R ,          NK  	  up # u up i r   )r   r   s    r	   ÚgetStdShortDayNamesr   0   s#   € Ü)Ô+Ó,Ñ+�aˆb�EˆEÑ+Ñ,Ð,ùÒ,r   c                óš   € V R8  d   V ^,          '       d   ^ # ^# V ^,          ^ 8w  d   ^ # V ^d,          ^ 8w  d   ^# V R,          ^ 8w  d   ^ # ^# )z@determine if specified year is leap year, returns Python booleané@  é�  r   ©Úyears   &r	   Ú
isLeapYearr   3   sE   € àˆd„{Ø�!�8Œ8ÙáØ	���QŒÙØ	���qŒÙØ	���qŒÙár   c                   ó   € ] tR t^CtRtRtR# )ÚNormalDateExceptionzException class for NormalDater   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r   r   r	   r   r   C   s   † Ù(Ûr   r   c                   óœ  a € ] tR t^Gt o RtR>R ltR tR tR tR t	R t
R	 tR
 tR tR tR tR tR t]R 4       tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R t"R  t#R! t$R" t%R# t&R$ t'R% t(R& t)R' t*R( t+R) t,R* t-R+ t.R, t/R- t0]R. 4       t1R/ t2R0 t3R1 t4R2 t5R3 t6R4 t7R5 t8R6 t9R7 t:R8 t;]:t<R9 t=R: t>R; t?R< t@R=tAV tBR# )?Ú
NormalDateaÀ  
NormalDate is a specialized class to handle dates without
all the excess baggage (time zones, daylight savings, leap
seconds, etc.) of other date structures.  The minimalist
strategy greatly simplifies its implementation and use.

Internally, NormalDate is stored as an integer with values
in a discontinuous range of -99990101 to 99991231.  The
integer value is used principally for storage and to simplify
the user interface.  Internal calculations are performed by
a scalar based on Jan 1, 1900.

Valid NormalDate ranges include (-9999,1,1) B.C.E. through
(9999,12,31) C.E./A.D.


1.0
    No changes, except the version number.  After 3 years of use by
    various parties I think we can consider it stable.

0.8
    Added Prof. Stephen Walton's suggestion for a range method
     - module author resisted the temptation to use lambda <0.5 wink>

0.7
    Added Dan Winkler's suggestions for __add__, __sub__ methods

0.6
    Modifications suggested by Kevin Digweed to fix:
     - dayOfWeek, dayOfWeekAbbrev, clone methods
     - Permit NormalDate to be a better behaved superclass

0.5
    Minor tweaking

0.4
     - Added methods __cmp__, __hash__
     - Added Epoch variable, scoped to the module
     - Added setDay, setMonth, setYear methods

0.3
    Minor touch-ups

0.2
     - Fixed bug for certain B.C.E leap years
     - Added Jim Fulton's suggestions for short alias class name =ND
       and __getstate__, __setstate__ methods

Special thanks:  Roedy Green
Nc                ó¤   € Vf;   V P                  \        P                  ! \        P                  ! 4       4      4       R# V P                  V4       R# )aI  
Accept 1 of 4 values to initialize a NormalDate:
    1. None - creates a NormalDate for the current day
    2. integer in yyyymmdd format
    3. string in yyyymmdd format
    4. tuple in (yyyy, mm, dd) - localtime/gmtime can also be used
    5. string iso date format see _iso_re above
    6. datetime.datetime or datetime.date
N)ÚsetNormalDateÚtimeÚ	localtime©ÚselfÚ
normalDates   &&r	   Ú__init__ÚNormalDate.__init__z   s5   € ð ÒØ×ÑœtŸ~š~¬d¯iªi«kÓ:Ö;à×Ñ˜zÖ*r   c                ó”   € \        V\        4      '       g   \        R4      hV P                  V P	                  4       V,           4       R# )ú3add days to date; use negative integers to subtractz)add method parameter must be integer typeN©Ú
isinstanceÚintr   Ú	normalizeÚscalar©r-   Údayss   &&r	   ÚaddÚNormalDate.add‰   s6   € ä˜$œs×#Ò#Ü%Ø;ó=ð =à�‰�t—{‘{“} tÕ+Ö,r   c                óŠ   € \        V\        4      '       g   \        R4      hV P                  4       pVP	                  V4       V# )z<add integer to normalDate and return a new, calculated valuez&__add__ parameter must be integer type©r4   r5   r   Úcloner:   ©r-   r9   Úcloneds   && r	   Ú__add__ÚNormalDate.__add__�   s;   € ä˜$œs×#Ò#Ü%Ø8ó:ð :à—‘“ˆØ�
‰
�4ÔØˆr   c                ó$   € V P                  V4      # )zfor completeness)rA   r8   s   &&r	   Ú__radd__ÚNormalDate.__radd__™   s   € à�|‰|˜DÓ!Ð!r   c                ó8   € V P                  V P                  4      # )z+return a cloned instance of this normalDate)Ú	__class__r.   ©r-   s   &r	   r>   ÚNormalDate.clone�   s   € à�~‰~˜dŸo™oÓ.Ð.r   c                ó\   € \        VR 4      '       g   R# V P                  VP                  8  # ©r.   F©Úhasattrr.   ©r-   Úothers   &&r	   Ú__lt__ÚNormalDate.__lt__¡   s'   € Ü�u˜\×*Ò*ÙØ�‰ ×!1Ñ!1Ñ1Ð1r   c                ó\   € \        VR 4      '       g   R# V P                  VP                  8*  # rK   rL   rN   s   &&r	   Ú__le__ÚNormalDate.__le__¦   ó'   € Ü�u˜\×*Ò*ÙØ�‰ %×"2Ñ"2Ñ2Ð2r   c                ó\   € \        VR 4      '       g   R# V P                  VP                  8H  # rK   rL   rN   s   &&r	   Ú__eq__ÚNormalDate.__eq__«   rU   r   c                ó\   € \        VR 4      '       g   R# V P                  VP                  8g  # ©r.   TrL   rN   s   &&r	   Ú__ne__ÚNormalDate.__ne__°   ó'   € Ü�u˜\×*Ò*ÙØ�‰ %×"2Ñ"2Ñ2Ð2r   c                ó\   € \        VR 4      '       g   R# V P                  VP                  8¬  # rZ   rL   rN   s   &&r	   Ú__ge__ÚNormalDate.__ge__µ   r]   r   c                ó\   € \        VR 4      '       g   R# V P                  VP                  8„  # rZ   rL   rN   s   &&r	   Ú__gt__ÚNormalDate.__gt__º   s'   € Ü�u˜\×*Ò*ÙØ�‰ ×!1Ñ!1Ñ1Ð1r   c                óD   € \        \        V P                  4      RR 4      # )zreturn the day as integer 1-31Néþÿÿÿ©r5   Úreprr.   rH   s   &r	   ÚdayÚNormalDate.day¿   s   € ä”4˜Ÿ™Ó(¨¨Ð-Ó.Ð.r   c                ó0   € \        V P                  4       !  # )ú;return integer representing day of week, Mon=0, Tue=1, etc.)Ú	dayOfWeekÚtoTuplerH   s   &r	   rl   ÚNormalDate.dayOfWeekÃ   s   € ä˜$Ÿ,™,›.Ñ)Ð)r   c                ó$   € \        V R \        4      # )Ú_dayOfWeekName)Úgetattrrp   rH   s   &r	   Ú__day_of_week_name__ÚNormalDate.__day_of_week_name__Ç   s   € ä�tÐ,¬^Ó<Ð<r   c                óR   € V P                   V P                  4       ,          R,          # )z@return day of week abbreviation for current date: Mon, Tue, etc.r   ©rr   rl   rH   s   &r	   ÚdayOfWeekAbbrevÚNormalDate.dayOfWeekAbbrevË   s   € à×(Ñ(¨¯©Ó)9Õ:¸2Õ>Ð>r   c                óD   € V P                   V P                  4       ,          # )z?return day of week name for current date: Monday, Tuesday, etc.ru   rH   s   &r	   ÚdayOfWeekNameÚNormalDate.dayOfWeekNameÏ   s   € à×(Ñ(¨¯©Ó)9Õ:Ð:r   c                óæ   € V P                  4       '       d   \        pM\        p^ p\        V P	                  4       ^,
          4       F  pW!V,          ,           pK  	  V P                  4       V,           # )zday of year)r   Ú_daysInMonthLeapYearÚ_daysInMonthNormalÚrangeÚmonthrh   )r-   ÚdaysByMonthÚpriorMonthDaysÚms   &   r	   Ú	dayOfYearÚNormalDate.dayOfYearÓ   sU   € à�?‰?×ÒÜ.‰Kä,ˆKØˆÜ�t—z‘z“| aÕ'Ö(ˆAØ+¸!­nÕ<ŠNñ )à�x‰x‹z˜NÕ*Ð*r   c                óÔ   € \        V\        4      '       d&   V P                  4       VP                  4       ,
          # V P                  4       \        V4      P                  4       ,
          # )zH
return value may be negative, since calculation is
self.scalar() - arg
)r4   r'   r7   r,   s   &&r	   ÚdaysBetweenDatesÚNormalDate.daysBetweenDatesÞ   sJ   € ô
 �j¤×,Ò,Ø—;‘;“= :×#4Ñ#4Ó#6Õ6Ð6à—;‘;“=¤:¨jÓ#9×#@Ñ#@Ó#BÕBÐBr   c                óˆ   € \        V\        4      '       d,   Vf   V P                  R J # V P                  VP                  8H  # ^ # r   )r4   r'   r.   )r-   Útargets   &&r	   ÚequalsÚNormalDate.equalsè   s;   € Ü�fœZ×(Ò(ØŠ~Ø—‘¨$Ð.Ð.à—‘¨&×*;Ñ*;Ñ;Ð;ár   c                ó‚   € V P                  V P                  4       RR \        V P                  4       4      ,           4      # )z"returns (cloned) last day of monthéøÿÿÿre   )rG   Ú__repr__ÚstrÚlastDayOfMonthrH   s   &r	   Ú
endOfMonthÚNormalDate.endOfMonthñ   s1   € à�~‰~˜dŸm™m›o¨b°Ð4´S¸×9LÑ9LÓ9NÓ5OÕOÓPÐPr   c                óT   € V P                  V P                  4       RR R,           4      # )z#returns (cloned) first day of monthÚ01r�   re   )rG   rŽ   rH   s   &r	   ÚfirstDayOfMonthÚNormalDate.firstDayOfMonthõ   s#   € à�~‰~˜dŸm™m›o¨b°Ð4°TÕ9Ó:Ð:r   c                óN   € V P                  4       pVRR : RVRR : RVRR : 2# )z3return date as string in common US format: MM/DD/YYÚ/Néüÿÿÿre   iúÿÿÿ©rŽ   ©r-   Úds   & r	   ÚformatUSÚNormalDate.formatUSù   ó,   € à�M‰M‹OˆØ˜r "›X q¨¨£v¨q°°BªxÐ8Ð8r   c                óN   € V P                  4       pVRR : RVRR : RVRR : 2# )z;return date as string in 4-digit year US format: MM/DD/YYYYr˜   Nr™   re   r�   rš   r›   s   & r	   ÚformatUSCenturyÚNormalDate.formatUSCenturyþ   rŸ   r   c                ó4   € \        V P                  4       4      # r   )r�   r   rH   s   &r	   Ú_fmtMÚNormalDate._fmtM  s   € Ü�4—:‘:“<Ó Ð r   c                ó0   € R V P                  4       ,          # ©z%02d)r   rH   s   &r	   Ú_fmtMMÚNormalDate._fmtMM  s   € Ø˜Ÿ
™
›Õ$Ð$r   c                ó"   € V P                  4       # r   )ÚmonthAbbrevrH   s   &r	   Ú_fmtMMMÚNormalDate._fmtMMM	  s   € Ø×ÑÓ!Ð!r   c                ó"   € V P                  4       # r   ©Ú	monthNamerH   s   &r	   Ú_fmtMMMMÚNormalDate._fmtMMMM  s   € Ø�~‰~ÓÐr   c                ó0   € V P                  4       ^ ,          # )é    r¯   rH   s   &r	   Ú	_fmtMMMMMÚNormalDate._fmtMMMMM  s   € Ø�~‰~Ó Õ"Ð"r   c                ó4   € \        V P                  4       4      # r   )r�   rh   rH   s   &r	   Ú_fmtDÚNormalDate._fmtD  s   € Ü�4—8‘8“:‹Ðr   c                ó0   € R V P                  4       ,          # r§   )rh   rH   s   &r	   Ú_fmtDDÚNormalDate._fmtDD  s   € Ø˜Ÿ™›
Õ"Ð"r   c                ó"   € V P                  4       # r   )rv   rH   s   &r	   Ú_fmtDDDÚNormalDate._fmtDDD  s   € Ø×#Ñ#Ó%Ð%r   c                ó"   € V P                  4       # r   )ry   rH   s   &r	   Ú_fmtDDDDÚNormalDate._fmtDDDD  s   € Ø×!Ñ!Ó#Ð#r   c                ó>   € R V P                  4       ^d,          ,          # r§   r   rH   s   &r	   Ú_fmtYYÚNormalDate._fmtYY  s   € Ø˜Ÿ™› S�Õ)Ð)r   c                ó4   € \        V P                  4       4      # r   )r�   r   rH   s   &r	   Ú_fmtYYYYÚNormalDate._fmtYYYY!  s   € Ü�4—9‘9“;ÓÐr   c                ó<  € VR,          p^ p \         P                  W#4      pV'       ds   \        V RVP                  4       ^R P	                  4       ,           4      ! 4       pVP                  4       w  rgV^ V V,           W'R ,           pV\        V4      ,           pK�  V# )aq  format like MS date using the notation
{YY}    --> 2 digit year
{YYYY}  --> 4 digit year
{M}     --> month as digit
{MM}    --> 2 digit month
{MMM}   --> abbreviated month name
{MMMM}  --> monthname
{MMMMM} --> first character of monthname
{D}     --> day of month as digit
{DD}    --> 2 digit day of month
{DDD}   --> abrreviated weekday name
{DDDD}  --> weekday name
:NNNÚ_fmtNéÿÿÿÿ)Ú_fmtPatÚsearchrq   ÚgroupÚupperÚspanÚlen)r-   ÚfmtÚrÚfr‚   ÚyÚiÚjs   &&      r	   ÚformatMSÚNormalDate.formatMS$  s†   € ð ��FˆØˆØÜ—‘˜qÓ#ˆAßÜ˜D ¨¯©«°1°R¨×)>Ñ)>Ó)@Õ!AÔBÓD�Ø—v‘v“x‘�Ø�q˜�V˜a•Z 1 R 5Õ(�Øœ˜A›•J’à�r   c                ó   € V P                   # )z(minimize persistent storage requirements©r.   rH   s   &r	   Ú__getstate__ÚNormalDate.__getstate__>  s   € à�‰Ðr   c                ó,   € \        V P                  4      # r   )Úhashr.   rH   s   &r	   Ú__hash__ÚNormalDate.__hash__B  s   € Ü�D—O‘OÓ$Ð$r   c                ó   € V P                   # r   rÛ   rH   s   &r	   Ú__int__ÚNormalDate.__int__E  s   € Ø�‰Ðr   c                ó4   € \        V P                  4       4      # )zK
determine if specified year is leap year, returning true (1) or
false (0)
)r   r   rH   s   &r	   r   ÚNormalDate.isLeapYearH  s   € ô
 ˜$Ÿ)™)›+Ó&Ð&r   c                ó�  € \        V\        4      '       g   ^ # \        \        V4      4      ^	8”  d   ^ # V^ 8  d   RV,          pM	RV,          p\        V4      ^8  d   ^ # \        V4      ^	8X  d   V^ ,          R8w  d   V^ ,          R8w  d   ^ # \        VRR 4      pVR	8  g   VR8”  g   V^ 8X  d   ^ # \        VRR
 4      pV^8  g   V^8”  d   ^ # \	        V4      '       d   \
        V^,
          ,          pM\        V^,
          ,          p\        VR
R 4      pV^8  g   We8”  d   ^ # VR8X  d   V^
8X  d   V^8”  d
   V^8  d   ^ # ^# )z.checks for date validity in [-]yyyymmdd formatú%09dú%08dÚ-Ú+Né'  é.  r™   éñØÿÿre   )r4   r5   rÑ   rg   r   r|   r}   )r-   r.   ÚdateStrr   r   ÚmaxDayrh   s   &&     r	   Ú_isValidNormalDateÚNormalDate._isValidNormalDateO  s!  € ä˜*¤S×)Ò)ÙÜŒt�JÓÓ  1Ô$ÙØ˜Œ>Ø˜zÕ)‰Gà˜zÕ)ˆGÜˆw‹<˜!ÔÙÜ�‹\˜QÔØ˜•
˜cÔ! g¨a¥j°CÔ&7ÙÜ�7˜3˜B�<Ó ˆØ�%Œ<˜4 $œ;¨$°!¬)ÙÜ�G˜B˜r�NÓ#ˆØ�1Œ9˜ œ
ÙÜ�d×ÒÜ)¨%°!­)Õ4‰Fä'¨°­	Õ2ˆFÜ�'˜"˜#�,ÓˆØ�Œ7�c”lÙØ�4Œ<˜E RœK¨C°!¬G¸¸b¼ÙÙr   c                ó¶   € V P                  4       '       d#   \        V P                  4       ^,
          ,          # \        V P                  4       ^,
          ,          # )z.returns last day of the month as integer 28-31)r   r|   r   r}   rH   s   &r	   r�   ÚNormalDate.lastDayOfMontho  s;   € à�?‰?×ÒÜ'¨¯
©
«°qÕ(8Õ9Ð9ä% d§j¡j£l°QÕ&6Õ7Ð7r   c                ó"   € V P                  4       # )z8override this method to use your preferred locale format)r�   rH   s   &r	   ÚlocaleFormatÚNormalDate.localeFormatv  s   € à�}‰}‹Ðr   c                óD   € \        \        V P                  4      RR 4      # )zreturns month as integer 1-12r™   re   rf   rH   s   &r	   r   ÚNormalDate.monthz  s   € ä”4˜Ÿ™Ó(¨¨BÐ/Ó0Ð0r   c                ó$   € \        V R \        4      # )Ú
_monthName)rq   rû   rH   s   &r	   Ú__month_name__ÚNormalDate.__month_name__~  s   € ä�t˜L¬Ó4Ð4r   c                ó`   € V P                   V P                  4       ^,
          ,          R,          # )z@returns month as a 3-character abbreviation, i.e. Jan, Feb, etc.r   ©rü   r   rH   s   &r	   r«   ÚNormalDate.monthAbbrev‚  s#   € à×"Ñ" 4§:¡:£<°!Õ#3Õ4°RÕ8Ð8r   c                óR   € V P                   V P                  4       ^,
          ,          # )z0returns month name, i.e. January, February, etc.rÿ   rH   s   &r	   r°   ÚNormalDate.monthName†  s   € à×"Ñ" 4§:¡:£<°!Õ#3Õ4Ð4r   c                ó   € V\         8  d   R\         ,          p\        V4      hV\        8”  d   R\        ,          p\        V4      h^ RIHp VR8¼  d(   R\        V! VR,           R,          4      4      ,           pMTVR8¼  d(   ^\        V! VR,           R,          4      4      ,           pM&R\        V! VR,           R,          4      4      ,           pV\        V4      ,
          ^,           pV^ 8:  d#   V^,
          pV\        V4      ,
          ^,           pR	p\        V4      '       d
   V^,           pWV8”  d#   V^,           pV\        V4      ,
          ^,           pVR8¼  d   VR8:  d
   V^
,           p\        V4      '       d   \        pM\        p^ p^p	\        \        V4      4       F#  p
W‡V
,          ,           pW…8¼  g   K  V
^,           p	 M	  ^ p\        V	^,
          4       F  p
W·V
,          ,           pK  	  W[,
          pV P                  WIV34       R
# )zconvert scalar to normalDatez#normalize(%d): scalar below minimumz%normalize(%d): scalar exceeds maximum)Úfloorr   i¬ g{®GáÓv@i‘
 i›
 ém  Nil;þÿi£jõÿr™   i¹;þÿ)Ú_bigBangScalarr   Ú_bigCrunchScalarÚmathr  r5   ÚfirstDayOfYearr   r|   r}   r~   rÑ   r)   )r-   r7   Úmsgr  r   r9   Ú
daysInYearr€   Údcr   r‚   r�   rh   s   &&           r	   r6   ÚNormalDate.normalizeŠ  sÉ  € à”NÔ"Ø7Ü õ!ˆCä% cÓ*Ð*ØÔ$Ô$Ø9Ü"õ#ˆCä% cÓ*Ð*ÝØ�WÔØœ#™e V¨f¥_¸Õ$@ÓAÓBÕB‰DØ�wÔØ”s™5 &¨6¥/°XÕ!=Ó>Ó?Õ?‰Dàœ™E 6¨F¥?°hÕ">Ó?Ó@Õ@ˆDØœ tÓ,Õ,¨qÕ0ˆØ�1Œ9Ø˜!•8ˆDØœN¨4Ó0Õ0°1Õ4ˆDØˆ
Ü�d×ÒØ# a�ˆJØÔØ˜!•8ˆDØœN¨4Ó0Õ0°1Õ4ˆDà�gÔ &¨GÔ"3Ø˜"•9ˆDÜ�d×ÒÜ.‰Kä,ˆKØˆ˜�Ü”s˜;Ó'Ö(ˆAØ !•nÕ$ˆBØŽzØ˜A��Ùñ	 )ð ˆÜ�u˜q•yÖ!ˆAØ+¸!­nÕ<ŠNñ "àÕ#ˆØ×Ñ˜D¨Ð-Ö.r   c                ó˜   € \        V\        4      '       g	   W,
          p. p\        V4       F  pVP                  W,           4       K  	  V# )zPReturn a range of normalDates as a list.  Parameter
may be an int or normalDate.)r4   r5   r~   Úappend)r-   r9   rÓ   rÖ   s   &&  r	   r~   ÚNormalDate.range¹  s>   € ô ˜$œs×#Ò#Ø•;ˆDØˆÜ�t–ˆAØ�H‰H�T•XÖñ àˆr   c                óp   € V P                   ^ 8  d   RV P                   ,          # RV P                   ,          # )zprint format: [-]yyyymmddrè   ré   rÛ   rH   s   &r	   rŽ   ÚNormalDate.__repr__Ã  s.   € ð
 �?‰?˜QÔØ˜DŸO™OÕ+Ð+à˜DŸO™OÕ+Ð+r   c                óŠ  € V P                  4       w  rp\        V4      V,           ^,
          pV P                  4       '       d/   \        V^,
          4       F  pV\        V,          ,           pK  	  M-\        V^,
          4       F  pV\
        V,          ,           pK  	  VR8X  d   V^
8”  g   V^
8X  d   V^8”  d
   V^
,
          pV# )z%days since baseline date: Jan 1, 1900rí   )rm   r	  r   r~   r|   r}   )r-   r   r   rh   r9   r‚   s   &     r	   r7   ÚNormalDate.scalarÍ  s£   € à!Ÿ\™\›^Ñˆ�cÜ˜dÓ# cÕ)¨AÕ-ˆØ�?‰?×ÒÜ˜5 1�9Ö%�ØÔ2°1Õ5Õ5’ò &ô ˜5 1�9Ö%�ØÔ0°Õ3Õ3’ñ &à�4Œ<Ø�rŒz˜e rœk¨c°A¬gØ˜b•y�Øˆr   c                ó´   € V P                  4       pV^8  g   W8”  d   RV,          p\        V4      hV P                  4       w  rEpV P                  WEV34       R# )zset the day of the monthzday is outside of range 1 to %dN)r�   r   rm   r)   )r-   rh   rð   r
  rÕ   r‚   rœ   s   &&     r	   ÚsetDayÚNormalDate.setDayÜ  sQ   € à×$Ñ$Ó&ˆØ�Œ7�c”lØ3°fÕ<ˆCÜ% cÓ*Ð*Ø—L‘L“N‰	ˆˆqØ×Ñ˜A #˜;Ö'r   c                ó„   € V^8  g   V^8”  d   \        R4      hV P                  4       w  r#pV P                  W!V34       R# )zset the month [1-12]zmonth is outside range 1 to 12N©r   rm   r)   )r-   r   rÕ   r‚   rœ   s   &&   r	   ÚsetMonthÚNormalDate.setMonthå  s<   € à�1Œ9˜ œ
Ü%Ð&FÓGÐGØ—L‘L“N‰	ˆˆqØ×Ñ˜A a˜=Ö)r   c                óÀ  € \        V\        4      '       d   Wn        Mù\        V4      '       d    \        V4      V n        MÖ\        V\        4      '       d    \        RVR,          ,          4      V n        M¡\        V\        4      '       d   VP                  V n        My\        V\        P                  \        P                  34      '       dC   VP                  ^d,          VP                  ,           ^d,          VP                   ,           V n        MRV n        V P#                  V P                  4      '       g   \        R\        V4      ,          4      hR#    \        P                  T4      pT'       dO   T P                  TP                  ^4      TP                  ^4      ,           TP                  ^4      ,           4        L«\        R\        T4      ,          4      h; i)zR
accepts date as scalar string/integer (yyyymmdd) or tuple
(year, month, day, ...)zunable to setNormalDate(%s)z%04d%02d%02dr   N)r4   r5   r.   r   Ú_iso_reÚmatchr)   rÎ   r   rg   Ú_DateSeqTypesr'   ÚdatetimeÚdater   r   rh   rñ   )r-   r.   r‚   s   && r	   r)   ÚNormalDate.setNormalDateì  sL  € ô �j¤×%Ò%Ø(�OÜ�:×Òð`Ü"% j£/�•ô ˜
¤=×1Ò1Ü! .°:¸bµ>Õ"AÓBˆD�OÜ˜
¤:×.Ò.Ø(×3Ñ3ˆD�OÜ˜
¤H×$5Ñ$5´h·m±mÐ#D×EÒEØ)Ÿ™¨sÕ2°:×3CÑ3CÕCÀSÕHÈÏÉÕWˆD�Oà"ˆDŒOØ×&Ñ& t§¡×7Ò7Ü%Ð&CÄdÈ:ÓFVÕ&VÓWÐWñ 8øð`Ü—M‘M *Ó-�ßØ×&Ñ& q§w¡w¨q£z°!·'±'¸!³*Õ'<¸Q¿W¹WÀQ»ZÕ'GÖHä-Ð.KÌdÐS]ÓN^Õ.^Ó_Ð_ús   °E ÅA+GÇGc                ó¾   € V^ 8X  d   \        R4      hVR8  d   \        R4      hVR8”  d   \        R4      hV P                  4       w  r#pV P                  WV34       R# )r´   zcannot set year to zerorì   zyear cannot be less than -9999z year cannot be greater than 9999Nrî   r  )r-   r   rÕ   r‚   rœ   s   &&   r	   ÚsetYearÚNormalDate.setYear  s\   € Ø�1Œ9Ü%Ð&?Ó@Ð@Ø�EŒ\Ü%Ð&FÓGÐGØ�DŒ[Ü%Ð&HÓIÐIØ—L‘L“N‰	ˆˆqØ×Ñ˜D Q˜<Ö(r   c                óœ   € \        V\        4      '       d   V P                  V) 4      # V P                  4       VP                  4       ,
          # r   ©r4   r5   rA   r7   ©r-   Úvs   &&r	   Ú__sub__ÚNormalDate.__sub__  s7   € Ü�aœ×ÒØ—<‘<  Ó#Ð#Ø�{‰{‹}˜qŸx™x›zÕ)Ð)r   c                óœ   € \        V\        4      '       d   \        V4      V ,
          # VP                  4       V P                  4       ,
          # r   )r4   r5   r'   r7   r(  s   &&r	   Ú__rsub__ÚNormalDate.__rsub__  s5   € Ü�aœ×ÒÜ˜a“= 4Õ'Ð'à—8‘8“: §¡£Õ-Ð-r   c                ó`   € V P                  4       V P                  4       V P                  4       3# )z'return date as (year, month, day) tuple)r   r   rh   rH   s   &r	   rm   ÚNormalDate.toTuple  s!   € à—	‘	“˜TŸZ™Z›\¨4¯8©8«:Ð6Ð6r   c                óD   € \        \        V P                  4      RR 4      # )z9return year in yyyy format, negative values indicate B.C.Nr™   rf   rH   s   &r	   r   ÚNormalDate.year!  s   € ä”4˜Ÿ™Ó(¨¨"Ð-Ó.Ð.r   rÛ   r   )Cr    r!   r"   r#   r$   r/   r:   rA   rD   r>   rP   rS   rW   r[   r_   rb   rh   rl   Úpropertyrr   rv   ry   rƒ   r†   rŠ   r‘   r•   r�   r¡   r¤   r¨   r¬   r±   rµ   r¸   r»   r¾   rÁ   rÄ   rÇ   rØ   rÜ   rà   rã   r   rñ   r�   rö   r   rü   r«   r°   r6   r~   rŽ   r7   r  r  r)   r$  Ú__setstate__r*  r-  rm   r   r%   Ú__classdictcell__©Ú__classdict__s   @r	   r'   r'   G   s\  ø‡ € ñ1ôd+ò-òò"ò/ò2ò
3ò
3ò
3ò
3ò
2ò
/ò*ð ñ=ó ð=ò?ò;ò	+òCòòQò;ò9ò
9ò
!ò%ò"ò ò#òò#ò&ò$ò*ò òò4ò%òò'òò@8òò1ð ñ5ó ð5ò9ò5ò-/ò^ò,òò(ò*òXò4)ð !€Lò*ò
.ò7÷/ð /r   r'   c                 ó   € \        R4      # )z%return lower boundary as a NormalDate)rî   é   r9  ©r'   r   r   r	   ÚbigBangr;  '  s   € ä�mÓ$Ð$r   c                 ó   € \        R4      # )z%return upper boundary as a NormalDate)rì   é   é   r:  r   r   r	   Ú	bigCrunchr?  +  s   € ä�nÓ%Ð%r   c                ó
  € V^8X  g   V^8X  d   V^,           pV ^,
          p V^V,          ,           ^V^,           ,          ^,          ,           V ,           V ^,          ,           V ^d,          ,
          V R,          ,           ^,          # )rk   r   r   )rÕ   r‚   rœ   s   &&&r	   rl   rl   /  se   € àˆA„v��a”Ø��FˆØ��EˆØ��!•�G�a˜˜1�•g˜q•jÕ  1Õ$ q¨!¥tÕ+¨a°­fÕ4°q¸#µvÕ=ÀÕBÐBr   c                ó$  € \        V \        4      '       g   R\        V 4      ,          p\        V4      hV ^ 8X  d   \        R4      hV ^ 8  d1   V R,          \        V ^,
          ^,          4      ,           R,
          pV# \        V ^,           ^,          4      pV R8”  dM   V\        V ^c,           R,
          ^d,          4      ,
          \        V R,           R,
          R,          4      ,           pV R,          V,           R,
          pV R	8”  d
   V^
,
          pV# )
z@number of days to the first of the year, relative to Jan 1, 1900z)firstDayOfYear() expected integer, got %sz$first day of year cannot be zero (0)r  i\•
 r   i�  r   iË–
 rí   )r4   r5   Útyper   )r   r
  ÚfirstDayÚ
leapAdjusts   &   r	   r	  r	  6  sä   € ä�dœ3×ÒØ9¼DÀ»JÕFˆÜ! #Ó&Ð&Øˆq„yÜ!Ð"HÓIÐIØ	�ŒØ˜3•J¤# t¨a¥x°1¥nÓ"5Õ5¸Õ>ˆð €Oô ˜$ �( a�Ó(ˆ
Ø�$Œ;Ø#¤c¨4°"­9°tÕ+;¸sÕ*BÓ&CÕCÜ˜d S�j¨4Õ/°3Õ6Ó7õ8ˆJà˜#•: 
Õ*¨VÕ3ˆØ�$Œ;Ø "•}ˆHØ€Or   c                ó\   € \        V \        4      ;'       d    T ;'       g    \        V 4      # )zconvert to ND if required)r4   r'   ÚND)rœ   s   &r	   ÚFNDrG  I  s#   € ä�aœ
Ó#×)Ð)¨×2Ð2¬R°«UÐ2r   iÚhñ c                   óZ   a € ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
 tR tRtV tR# )ÚBusinessDateiR  z
Specialised NormalDate
c                ó”   € \        V\        4      '       g   \        R4      hV P                  V P	                  4       V,           4       R# )r2   z$add method parameter must be integerNr3   r8   s   &&r	   r:   ÚBusinessDate.addV  s2   € ä˜$œs×#Ò#Ü%Ð&LÓMÐMØ�‰�t—{‘{“} tÕ+Ö,r   c                óŠ   € \        V\        4      '       g   \        R4      hV P                  4       pVP	                  V4       V# )z>add integer to BusinessDate and return a new, calculated valuez!__add__ parameter must be integerr=   r?   s   && r	   rA   ÚBusinessDate.__add__\  s7   € ä˜$œs×#Ò#Ü%Ð&IÓJÐJØ—‘“ˆØ�
‰
�4ÔØˆr   c                ó°   € \        V\        4      ;'       d    V P                  V) 4      ;'       g&    V P                  4       VP                  4       ,
          # r   r'  r(  s   &&r	   r*  ÚBusinessDate.__sub__d  s;   € Ü˜!œCÓ ×5Ð5 T§\¡\°1°"Ó%5×SÐS¸¿¹»ÈÏÉËÕ9SÐSr   c                ó,   € \        V P                  4      # r   )rF  r.   rH   s   &r	   ÚasNormalDateÚBusinessDate.asNormalDateg  s   € Ü�$—/‘/Ó"Ð"r   c                ó8   € V P                   P                  V4      # r   )rQ  r†   r,   s   &&r	   r†   ÚBusinessDate.daysBetweenDatesj  s   € Ø× Ñ ×1Ñ1°*Ó=Ð=r   c                óh   € V P                  4       ^8”  d   \        RV P                  ,          4      hR# )é   z%r isn't a business dayN)rl   r   r.   rH   s   &r	   Ú	_checkDOWÚBusinessDate._checkDOWm  s,   € Ø�>‰>Ó˜AÔÔ%8Ð9RÐUY×UdÑUdÕ9dÓ%eÐeÑr   c                ó”   € \        V4      p\        P                  W^,          ^,          V^,          ,           \        ,           4       R# )é   N)r5   r'   r6   ÚBDEpochScalar)r-   rÖ   s   &&r	   r6   ÚBusinessDate.normalizep  s.   € Ü�‹FˆÜ×Ñ˜T a¥4¨¥(¨1¨Q­3¥,¬}Õ"<Ö=r   c                óx   € V P                  4       pV\        ,
          p^V^,          ,          V^,          ,           # )rZ  )rQ  ÚBDEpoch)r-   rœ   rÖ   s   &  r	   r7   ÚBusinessDate.scalart  s/   € Ø×ÑÓˆØ”�Kˆà�!�Q•$�x˜!˜A�#�~Ðr   c                óP   € \         P                  W4       V P                  4        R # r   )r'   r)   rW  r,   s   &&r	   r)   ÚBusinessDate.setNormalDatez  s   € Ü× Ñ  Ô1Ø�‰Ör   r   N)r    r!   r"   r#   r$   r:   rA   r*  rQ  r†   rW  r6   r7   r)   r%   r5  r6  s   @r	   rI  rI  R  s>   ø‡ € ñò-òòTò#ò>òfò>ò÷ð r   rI  Ú__main__zNormalDate test:z	  Today (z) is: Ú z  Yesterday was: z  Tomorrow will be: z)  Days between tomorrow and yesterday: %dz{d}/{m}/{yy}z{dd}/{m}/{yy}z{ddd} {d}/{m}/{yy}z{dddd} {d}/{m}/{yy}z{d}/{mm}/{yy}z{d}/{mmm}/{yy}z{d}/{mmmm}/{yy}z{d}/{m}/{yyyy}Ú20010116zb=z
b.scalar()i|°½ÿ)r>  é   r>  é   r>  rf  r>  r>  rf  r>  rf  r>  )r>  é   r>  rf  r>  rf  r>  r>  rf  r>  rf  r>  io;þÿ)7Ú__version__r$   r  r  r}   r|   rp   ÚlowerÚsplitr   rû   r   Úrer*   r   Úutilsr   rM   ÚlistÚtupler   r  ÚcompileÚ	MULTILINEÚ
IGNORECASErÌ   r  r
   r   r   r   r   Ú	Exceptionr   r'   r;  r?  rl   r	  rG  ÚEpochrF  r^  r[  rI  r    ÚtodayÚprintrv   rö   Ú	yesterdayÚtomorrowrØ   Úbr7   r   r   r	   Ú<module>ry     s¡  ðð €Øb€à€ØÐ Ú:Ð Ú<Ð ØO€Ø$×*Ñ*Ó,×2Ñ2Ó4Ð Ø×%Ñ%Ó'€ðC€
à×"Ñ"Ó$×*Ñ*Ó,€Ø×ÑÓ€
ç Ó Ý á
ˆ4�×ÒØ˜% × 0Ñ 0Ð1�Mà˜%�L€Mà
�*Š*Ð4°R·\±\À"Ç-Á-Õ5OÓ
P€Ø
�*Š*Ð5Ó
6€òò/òò-òô 	˜)ô 	÷\/ñ \/ò@%ò&òCòò&3ñ ƒi€Ø€Ù
ˆ8‹€Ø€ô*�:ô *ðX ˆzÕÙ‹L€EÙ	Ð
ÔÚ	£e¨U×-BÑ-BÖ-DÀe×FXÑFXÕFZÐ
[Ô\Ø˜•	€IÚ	 i×&?Ñ&?Ö&AÀ9×CYÑCYÕC[Ð
\Ô]Ø�q�y€HÚ	¨×)AÑ)AÖ)CÀX×EZÑEZÕE\Ð
]Ô^Ù	Ð
5¸ÀIÕ9MÕ
NÔOÙ	ˆ%�.‰.˜Ó
(Ô)Ù	ˆ%�.‰.˜Ó
)Ô*Ù	ˆ%�.‰.Ð-Ó
.Ô/Ù	ˆ%�.‰.Ð.Ó
/Ô0Ù	ˆ%�.‰.˜Ó
)Ô*Ù	ˆ%�.‰.Ð)Ó
*Ô+Ù	ˆ%�.‰.Ð*Ó
+Ô,Ù	ˆ%�.‰.Ð)Ó
*Ô+Ù�ZÓ €AÙ	ˆ$ˆq�˜qŸx™x›zÖ*ñ% r   