Files
pyGoEdge-UserPanel/.venv/Lib/site-packages/django/utils/__pycache__/timesince.cpython-312.pyc

60 lines
5.6 KiB
Plaintext
Raw Normal View History

2025-11-18 03:36:49 +08:00
<EFBFBD>
j<> i2<00>
<00><><00>ddlZddlmZddlmZddlmZmZeddd<07>edd d<07>ed
d d<07>ed d d<07>eddd<07>eddd<07>d<12>Ze ej<00><00>Z gd<13>Z dZ dd<15>Zdd<16>Zy)<19>N)<01>avoid_wrapping)<01>is_aware)<02>gettext<78> ngettext_lazyz %(num)d yearz %(num)d years<72>numz %(num)d monthz%(num)d monthsz %(num)d weekz %(num)d weeksz %(num)d dayz %(num)d daysz %(num)d hourz %(num)d hoursz%(num)d minutez%(num)d minutes)<06>year<61>month<74>week<65>day<61>hour<75>minute)i<>: i<>Qi<00><) <0C><00>r<00>rrrrrrrrc <00>@<00>|<03>t}|dkr td<03><00>t|tj<00>s5tj|j|j
|j <00>}|rOt|tj<00>s5tj|j|j
|j <00>}|s7tjjt|<00>r |jnd<01>}n1t|<01>r&t|<00>r|j|j<00>}|r||}}||z
}|jdzdzdz|jz}|dkrt|dddiz<00>S|j|jz
dz|j
|j
z
z}|j |j kDs:|j |j k(r&|j<00>|j<00>kDr|d z}t|d<08>\}} |s| r<>|j|z}
|j
| z} | dkDr
| dz} |
d z }
tj|
| t!t"| d z
|j <00>|j$|j&|j(|j<00>
<EFBFBD>} n|} || z
j+<00>} || g}t,D])}t/| |z<00>}|j1|<10>| ||zz} <0A>+d}t3|<0E>D] \}}|dk7s<01> nt|dddiz<00>Sg}d}|t5t6<00>kr]||krX||}|dk(rnMt6|}|j1t||d|iz<00><00>|d z }|d z }|t5t6<00>kr||kr<01>Xt9d <0B>j;|<13>S) al
Take two datetime objects and return the time between d and now as a nicely
formatted string, e.g. "10 minutes". If d occurs after now, return
"0 minutes".
Units used are years, months, weeks, days, hours, and minutes.
Seconds and microseconds are ignored.
The algorithm takes into account the varying duration of years and months.
There is exactly "1 year, 1 month" between 2013/02/10 and 2014/03/10,
but also between 2007/08/10 and 2008/09/10 despite the delta being 393 days
in the former case and 397 in the latter.
Up to `depth` adjacent units will be displayed. For example,
"2 weeks, 3 days" and "1 year, 3 months" are possible outputs, but
"2 weeks, 3 hours" and "1 year, 5 days" are not.
`time_strings` is an optional dict of strings to replace the default
TIME_STRINGS dict.
`depth` is an optional integer to control the number of adjacent time
units returned.
Originally adapted from
https://web.archive.org/web/20060617175230/http://blog.natbat.co.uk/archive/2003/Jun/14/time_since
Modified to improve results for years and months.
Nrzdepth must be greater than 0.<2E>rr r<00> <00>)<01>tzinfoz, )<1E> TIME_STRINGS<47>
ValueError<EFBFBD>
isinstance<EFBFBD>datetimerr r <00>nowrr<00>
astimezone<EFBFBD>days<79>secondsr<00>time<6D>divmod<6F>min<69> MONTHS_DAYSr r <00>second<6E> total_seconds<64> TIME_CHUNKS<4B>int<6E>append<6E> enumerate<74>len<65>TIME_STRINGS_KEYSr<00>join)<16>dr<00>reversed<65> time_strings<67>depth<74>delta<74>since<63> total_months<68>years<72>months<68>
pivot_year<EFBFBD> pivot_month<74>pivot<6F>remaining_time<6D>partials<6C>chunk<6E>count<6E>i<>value<75>result<6C> current_depth<74>names <20>EE:\Project\pygoedge\.venv\Lib\site-packages\django/utils/timesince.py<70> timesincerBsM<00><00>8<14><1B>#<23> <0C> <0C><01>z<EFBFBD><18>8<>9<>9<> <15>a<EFBFBD><18>*<2A>*<2A> +<2B> <14> <1D> <1D>a<EFBFBD>f<EFBFBD>f<EFBFBD>a<EFBFBD>g<EFBFBD>g<EFBFBD>q<EFBFBD>u<EFBFBD>u<EFBFBD> 5<><01>
<EFBFBD>:<3A>c<EFBFBD>8<EFBFBD>#4<>#4<>5<><16><1F><1F><03><08><08>#<23>)<29>)<29>S<EFBFBD>W<EFBFBD>W<EFBFBD>=<3D><03> <0F><16><1F><1F>#<23>#<23><08><11> <0B>A<EFBFBD>H<EFBFBD>H<EFBFBD><14>F<><03> <11>#<23><1D>8<EFBFBD>A<EFBFBD>;<3B><11>n<EFBFBD>n<EFBFBD>Q<EFBFBD>X<EFBFBD>X<EFBFBD>&<26><03><0F><14>a<EFBFBD>3<EFBFBD><01> <0F>!<21>G<EFBFBD>E<EFBFBD> <12>J<EFBFBD>J<EFBFBD><12>O<EFBFBD>b<EFBFBD> <20>2<EFBFBD> %<25><05> <0A> <0A> 5<>E<EFBFBD> <0C><01>z<EFBFBD><1D>l<EFBFBD>8<EFBFBD>4<><05>q<EFBFBD>z<EFBFBD>A<>B<>B<><18>H<EFBFBD>H<EFBFBD>q<EFBFBD>v<EFBFBD>v<EFBFBD>%<25><12>+<2B>s<EFBFBD>y<EFBFBD>y<EFBFBD>1<EFBFBD>7<EFBFBD>7<EFBFBD>/B<>C<>L<EFBFBD><08>u<EFBFBD>u<EFBFBD>s<EFBFBD>w<EFBFBD>w<EFBFBD><EFBFBD>1<EFBFBD>5<EFBFBD>5<EFBFBD>C<EFBFBD>G<EFBFBD>G<EFBFBD>+<2B><01><06><06><08>3<EFBFBD>8<EFBFBD>8<EFBFBD>:<3A>0E<30><14><01><19> <0C><1A><<3C><12>,<2C>M<EFBFBD>E<EFBFBD>6<EFBFBD>
 <0A><06><16>V<EFBFBD>V<EFBFBD>e<EFBFBD>^<5E>
<EFBFBD><17>g<EFBFBD>g<EFBFBD><06>&<26> <0B> <16><12> <1B> <17>2<EFBFBD> <1D>K<EFBFBD> <16>!<21>O<EFBFBD>J<EFBFBD><18>!<21>!<21> <16> <17> <0F> <0B>K<EFBFBD>!<21>O<EFBFBD>,<2C>a<EFBFBD>e<EFBFBD>e<EFBFBD> 4<> <0A>F<EFBFBD>F<EFBFBD> <0A>H<EFBFBD>H<EFBFBD> <0A>H<EFBFBD>H<EFBFBD><14>8<EFBFBD>8<EFBFBD>
<EFBFBD><05><12><05><19>E<EFBFBD>k<EFBFBD>0<>0<>2<>N<EFBFBD><15>v<EFBFBD><EFBFBD>H<EFBFBD><1C><05><13>N<EFBFBD>e<EFBFBD>+<2B>,<2C><05><10><0F><0F><05><1E><16>%<25>%<25>-<2D>'<27><0E><1D>
<EFBFBD>A<EFBFBD><1D>h<EFBFBD>'<27><08><01>5<EFBFBD> <10>A<EFBFBD>:<3A> <11>(<28><1E>l<EFBFBD>8<EFBFBD>4<><05>q<EFBFBD>z<EFBFBD>A<>B<>B<> <0F>F<EFBFBD><15>M<EFBFBD>
<0B>c<EFBFBD>#<23>$<24>
$<24><1D><15>)><3E><18><11> <0B><05> <10>A<EFBFBD>:<3A> <11> <20><11>#<23><04><0E> <0A> <0A>n<EFBFBD>\<5C>$<24>%7<>5<EFBFBD>%<25>.<2E>%H<>I<>J<><15><11><1A> <0A> <09>Q<EFBFBD><06><01> <0C>c<EFBFBD>#<23>$<24>
$<24><1D><15>)><3E> <13>4<EFBFBD>=<3D> <1D> <1D>f<EFBFBD> %<25>%<25>c<00>"<00>t||d||<03><02>S)zV
Like timesince, but return a string measuring the time until the given time.
T)r-r.r/)rB)r,rr.r/s rA<00> timeuntilrE<00>s<00><00> <15>Q<EFBFBD><03>d<EFBFBD><1C>U<EFBFBD> S<>SrC)NFN<46>)NNrF)r<00>django.utils.htmlr<00>django.utils.timezoner<00>django.utils.translationrrr<00>list<73>keysr*r%r"rBrE<00>rCrA<00><module>rMs<><00><01><0F>,<2C>*<2A>;<3B> <1A>.<2E>/<2F>5<EFBFBD> A<> <1A>?<3F>,<<3C>e<EFBFBD> D<> <19>.<2E>/<2F>5<EFBFBD> A<> <18><1D><0E><05> ><3E> <19>.<2E>/<2F>5<EFBFBD> A<><1B>,<2C>.?<3F><15>G<> <02> <0C><19><1C>*<2A>*<2A>,<2C>-<2D><11><02> <0B>?<3F> <0B>k&<26>\TrC