JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr ӝ`HaddlZddlZddlZddlmZddlmZddlmZddl m Z e de dDx\Z ZZZZZZZgd ZGd d eZd Zy) N)copysign) integer_types)warnweekdayc#2K|]}t|ywNr.0xs 8/usr/lib/python3/dist-packages/dateutil/relativedelta.py r s-KQgaj-Ks) relativedeltaMOTUWETHFRSASUceZdZdZ ddZdZedZejdZdZ dZ d Z d Z d Z d Zd ZdZdZeZdZeZdZdZdZdZeZdZy)ra; The relativedelta type is designed to be applied to an existing datetime and can replace specific components of that datetime, or represents an interval of time. It is based on the specification of the excellent work done by M.-A. Lemburg in his `mx.DateTime `_ extension. However, notice that this type does *NOT* implement the same algorithm as his work. Do *NOT* expect it to behave like mx.DateTime's counterpart. There are two different ways to build a relativedelta instance. The first one is passing it two date/datetime classes:: relativedelta(datetime1, datetime2) The second one is passing it any number of the following keyword arguments:: relativedelta(arg1=x,arg2=y,arg3=z...) year, month, day, hour, minute, second, microsecond: Absolute information (argument is singular); adding or subtracting a relativedelta with absolute information does not perform an arithmetic operation, but rather REPLACES the corresponding value in the original datetime with the value(s) in relativedelta. years, months, weeks, days, hours, minutes, seconds, microseconds: Relative information, may be negative (argument is plural); adding or subtracting a relativedelta with relative information performs the corresponding arithmetic operation on the original datetime value with the information in the relativedelta. weekday: One of the weekday instances (MO, TU, etc) available in the relativedelta module. These instances may receive a parameter N, specifying the Nth weekday, which could be positive or negative (like MO(+1) or MO(-2)). Not specifying it is the same as specifying +1. You can also use an integer, where 0=MO. This argument is always relative e.g. if the calculated date is already Monday, using MO(1) or MO(-1) won't change the day. To effectively make it absolute, use it in combination with the day argument (e.g. day=1, MO(1) for first Monday of the month). leapdays: Will add given days to the date found, if year is a leap year, and the date found is post 28 of february. yearday, nlyearday: Set the yearday or the non-leap year day (jump leap days). These are converted to day/month/leapdays information. There are relative and absolute forms of the keyword arguments. The plural is relative, and the singular is absolute. For each argument in the order below, the absolute form is applied first (by setting each attribute to that value) and then the relative form (by adding the value to the attribute). The order of attributes considered when this relativedelta is added to a datetime is: 1. Year 2. Month 3. Day 4. Hours 5. Minutes 6. Seconds 7. Microseconds Finally, weekday is applied, using the rule described above. For example >>> from datetime import datetime >>> from dateutil.relativedelta import relativedelta, MO >>> dt = datetime(2018, 4, 9, 13, 37, 0) >>> delta = relativedelta(hours=25, day=1, weekday=MO(1)) >>> dt + delta datetime.datetime(2018, 4, 2, 14, 37) First, the day is set to 1 (the first of the month), then 25 hours are added, to get to the 2nd day and 14th hour, finally the weekday is applied, but since the 2nd is already a Monday there is no effect. Nc |rr|rot|tjrt|tjs tdt|tjt|tjk7rt|tjs.tjj |j }nGt|tjs-tjj |j }d|_d|_d|_d|_ d|_ d|_ d|_ d|_ d|_d|_d|_d|_d|_d|_d|_d|_d|_|j|jz dz|j|jz z}|j/||j1|}||krt2j4}d}nt2j6}d}|||r1||z }|j/||j1|}|||r1||z }|j|jdzz|_ |j|_ n[t9d||fDr t;dt=||_t=||_||d zz|_||_ ||_ | |_ | |_ | |_ | |_| |_||_||_||_||_||_t9d | | |||||fDrt?d t@t|tBrtD||_n||_d}|r|}n|r|}|d kDrd|_ |rSgd }tG|D]3\}}||ks |dz|_|dk(r||_n|||dz z |_nt;d|z|jIy)Nz&relativedelta only diffs datetime/dater riQc3DK|]}|duxr|t|k7ywr intr s rrz)relativedelta.__init__..s$JQ1D=0Q#a&[0J zGNon-integer years and months are ambiguous and not currently supported.rc3DK|]}|duxrt||k7ywr rr s rrz)relativedelta.__init__..s,;D=0SVq[0;r zNon-integer value passed as absolute information. This is not a well-defined condition and will raise errors in future versions.;) r"Zxii0iNinzinvalid year day (%d))% isinstancedatetimedate TypeError fromordinal toordinalyearsmonthsdaysleapdayshoursminutesseconds microsecondsyearmonthdayrhourminutesecond microsecond _has_time _set_months__radd__operatorgtltany ValueErrorrrDeprecationWarningrweekdays enumerate_fix)selfdt1dt2r0r1r2r3weeksr4r5r6r7r8r9r:ryearday nlyeardayr;r<r=r>dtmcompare incrementdeltaydayydayidxidxydayss r__init__zrelativedelta.__init__is 3sHMM2sHMM2 HII3 1 12sH$5$567!#x'8'89"++77 HC#C):):;"++77 HCDJDKDIDMDJDLDL !D DIDJDHDLDIDKDK#D DNhh)R/399syy3HIF   V $--$CSy"++ "++ #s#)#  (mmC(#s# #IE ==5::+==DL % 2 2D J5&/JJ "JKKUDJf+DKuqy(DI$DMDJ"DL"DL ,D DIDJDHDI DK DK*D ;!5#t#V[:;;23EG'=1'0 & D R<$&DM4"+G"4 EJCu}%(U !8'+DH'+GCEN':DH E%%r?)rKsdivmods rrJzrelativedelta._fixs t  !F *d''(Ad//!3W=HC #aD  LLC!G #L t|| r !dll#AdllQ.3HC7DL LLC!G #L t|| r !dll#AdllQ.3HC7DL JJ#' !J tzz?R djj!Adjj1nb1HCqDJ IIq I t{{ b dkk"AdkkAor2HC'DK JJ#' !J JJ$,,$,,$:K:K99(DKK,C '4+;+;+GDNDNrZc2t|jdz S)Ng@)rr2rKs rrNzrelativedelta.weekss499s?##rZcR|j|jdzz |dzz|_y)Nr)r2rN)rKvalues rrNzrelativedelta.weeks s#IIa0519< rZc||_t|jdkDrFt|j}t|j|zd\}}||z|_||z|_yd|_y)Nr_rr)r1r`rarbr0)rKr1rcrdres rr@zrelativedelta._set_monthss] t{{ b dkk"AdkkAor2HC'DKqDJDJrZct|j}t|jd|j|z zzd}t|}t|jd||z zzd}t|}t|j d||z zzd}t|}t|j d||z zz}|j|j|j||||||j|j|j|j|j|j|j |j"|j$S)aC Return a version of this object represented entirely using integer values for the relative attributes. >>> relativedelta(days=1.5, hours=2).normalized() relativedelta(days=+1, hours=+14) :return: Returns a :class:`dateutil.relativedelta.relativedelta` object. r^r_r\ g.Ar0r1r2r4r5r6r7r3r8r9r:rr;r<r=r>)rr2roundr4r5r6r7 __class__r0r1r3r8r9r:rr;r<r=r>) rKr2hours_fr4 minutes_fr5 seconds_fr6r7s r normalizedzrelativedelta.normalizeds499~ R499t+;%<|r||jz }|j@d i|t'j(||j |j|j|jz} |jr|jj|jjBxsd} } t5| dz dz} | d kDr| d| jz | zdzz } n| | j| z dzz } | d z} | t'j(| z } | S) Nrnrr)r8r9r:)r;r<r=r>)r2r4r5r6r7rrr)r2)"r*rrpr0r1r2r4r5r6r7r3r8r9r:rr;r<r=r>r+ timedeltar,NotImplementedr?r.r/r`mincalendar monthrangegetattrisleapreplacen) rKotherr8r9r:replattrrir2retrnthjumpdayss r__add__zrelativedelta.__add__=s e] +>> djj(@(- t{{(B&+jj499&<',{{TZZ'?).)E).)E/4/A/A/3/@/@0A*/..*IDMM5:ZZ5Kuzz,0II7<{{7N -1ZZ38993Heii+/88;@==;T%--/3||5:ZZ5Kuzz,0II9>9Q.2kk9>9Q.2kkCHCTCT59D:e.?.?/"A A2/3.>.>3"A A4 eX// 0>> )-'+yy5::'=(, *.,,*.,,*F/3/@/@5CUCU/U+/=='+yy(, &*hh*.,,'+yy)-)-.2.>.>"@ @ %/! ! ^^Juh6G6G$H%%11%//2CDE 'UZZ3 )ekk ;;DKK(.B. .. .. T[[ Erz    (%%dE215(('eii)uS9? #DD$'E "T  #yy ==UQY8??4+@ DMM !Du}}$t$##*.**,0LL,0LL151B1B DD <<<<//1D1SGC1 )HQwQ.8A==S[[]W499B 8%%84 4C rZc$|j|Sr )rrKrs rrAzrelativedelta.__radd__s||E""rZc@|jj|Sr )__neg__rArs r__rsub__zrelativedelta.__rsub__s||~&&u--rZct|tstS|j|j|jz |j |j z |j |j z |j|jz |j|jz |j|jz |j|jz |jxs |j|j |jn |j|j |jn |j|j |jn |j|j |jn |j|j |j n |j |j" |j"n |j"|j$ |j$n |j$|j& |j&S|j&SNrn)r*rryrpr0r1r2r4r5r6r7r3r8r9r:rr;r<r=r>rs r__sub__zrelativedelta.__sub__s%/! !~~DJJ$<$(KK%,,$>"&))ejj"8#':: #;%)\\EMM%A%)\\EMM%A*.*;*;e>P>P*P&*mm&Eu~~04 0E499(- 26**2HDJJ$)KK.2hh.B$(("'))6:ll6Ndll&+mm04 0E499#(::48KK4KT[[%*\\48KK4KT[[%*\\>B>N>N15?6$*:*:-> >0+0*;*;1> >rZc|jt|jt|jt|jt|j t|j t|jt|j|j|j|j|j|j|j|j|j |j"Sr)rpr`r0r1r2r4r5r6r7r3r8r9r:rr;r<r=r>rgs r__abs__zrelativedelta.__abs__s~~C O%(%5#&tyy>$' O&)$,,&7&)$,,&7+.t/@/@+A'+}}#'99$(JJ"&((&*ll#'99%)[[%)[[*.*:*:< rgs rrzrelativedelta.__neg__s~~TZZK%)[[L#'99*$(JJ;&*ll]&*ll]+/+<+<*<&*mm"&))#'::!%%)\\"&))$(KK$(KK)-)9)9; ;rZc|j xr|j xr|j xr|j xr|j xr|j xr|j xr|j xr~|jduxrn|jduxr^|jduxrN|jduxr>|jduxr.|jduxr|jduxr|jdu Sr rnrgs r__bool__zrelativedelta.__bool__s! N- O- M- N- $ -  $ - ))) - %-II%-JJ$&-HH$-LLD(-II%-KK4'-KK4'-$$,. .rZcn t|}|jt |j |zt |j |zt |j|zt |j|zt |j|zt |j|zt |j|z|j|j|j|j|j |j"|j$|j&|j(S#t$r tcYSwxYwr)floatr-ryrprr0r1r2r4r5r6r7r3r8r9r:rr;r<r=r>)rKrfs r__mul__zrelativedelta.__mul__s "e A~~C Q$7$' a$8"%dii!m"4#&tzzA~#6%()9%:%()9%:*-d.?.?!.C*D&*mm"&))#'::!%%)\\"&))$(KK$(KK)-)9)9; ; "! ! "s D""D43D4ct|tstS|js |jr|jr |jsy|jj|jjk7ry|jj|jj}}||k7r|r|dk(r|r|dk(sy|j |j k(xr||j |j k(xr`|j|jk(xrD|j|jk(xr(|j|jk(xr |j|jk(xr|j|jk(xr|j|jk(xr|j|jk(xr|j|jk(xr|j|jk(xrj|j |j k(xrO|j"|j"k(xr4|j$|j$k(xr|j&|j&k(S)NFr)r*rryrrr0r1r2r4r5r6r7r3r8r9r:r;r<r=r>)rKrn1n2s r__eq__zrelativedelta.__eq__s%/! ! <<5==<rgs r__hash__zrelativedelta.__hash__#s LL JJ KK II JJ LL LL    MM II JJ HH II KK KK   !   rZc&|j| Sr )rrs r__ne__zrelativedelta.__ne__7s;;u%%%rZcl dt|z }|j|S#t$r tcYSwxYwNr)rr-ryr)rKr reciprocals r__div__zrelativedelta.__div__:s= "U5\)J||J'' "! ! "s !33c dg}dD]3}t||}|s|jdj||5dD]<}t||}||jdj|t|>dj|jj dj |S) N)r0r1r2r3r4r5r6r7z{attr}={value:+g})rri)r8r9r:rr;r<r=r>z{attr}={value}z{classname}({attrs})z, ) classnameattrs)r}appendformatreprrp__name__join)rKlrris r__repr__zrelativedelta.__repr__Ds D MDD$'E,33U3KL  M @ PDD$'E )00d$u+0NO  P &,,t~~7N7N3799Q<-A ArZ)NNrrrrrrrrrNNNNNNNNNN)r __module__ __qualname____doc__rYrJpropertyrNsetterr@rtrrArrrrr __nonzero__r__rmul__rrrr __truediv__rrwrZrrrsTl&*>?=>:>)-BF ||B$$ \\==!:<$;$.$K;.H76 (&(K ArZrc,ttd|Sr)rr)r s rraraTs x1~ rZ)r+r{rBmathrsixrwarningsr_commonrtuplerangerrrrrrrrH__all__objectrrarwrZrrs](--K%(-K(KKBBBX EAFADrZ