https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /opt/alt-old/python27/lib/python2.7/site-packages/paste/util/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt-old/python27/lib/python2.7/site-packages/paste/util/dateinterval.pyo
�
b�Nc@s	dZddlZddgZdZedZedZedZedZed	Zed
Z	ie	d6ed6ed
6ed6ed6ed6ed6Z
e
j�Zej
d��ed�Zejd�Zd�Zd�ZedkrddlZej�ndS(s
DateInterval.py

Convert interval strings (in the form of 1w2d, etc) to
seconds, and back again.  Is not exactly about months or
years (leap years in particular).

Accepts (y)ear, (b)month, (w)eek, (d)ay, (h)our, (m)inute, (s)econd.

Exports only timeEncode and timeDecode functions.  
i����Ntinterval_decodetinterval_encodeii<iiiimtytbtwtdthtmtscCst|d|d�S(Ni(tcmp(taR((sH/opt/alt/python27/lib/python2.7/site-packages/paste/util/dateinterval.pyt<lambda>"scCs�d}|}t|�}xLtD]D\}}||krt||�\}}|d||f7}qqW|dkr�d|}n|s�dS|r�d|}n|S(s�Encodes a number of seconds (representing a time interval)
    into a form like 1h2d3s.

    >>> interval_encode(10)
    '10s'
    >>> interval_encode(493939)
    '5d17h12m19s'
    ts%i%sit-t0t+(tabsttimeOrderedtdivmod(tsecondstinclude_signRtorigtchartamountti((sH/opt/alt/python27/lib/python2.7/site-packages/paste/util/dateinterval.pyR$s	

s[0-9]+[a-zA-Z]cCs�d}d}|j�}|jd�r:|d}d}n|jd�rV|d}nxjt|t�D]Y}|jd�dj�}tj|�s�qfn|t|jd�d �t|7}qfW|S(s�Decodes a number in the format 1h4d3m (1 hour, 3 days, 3 minutes)
    into a number of seconds

    >>> interval_decode('40s')
    40
    >>> interval_decode('10000s')
    10000
    >>> interval_decode('3d1w45s')
    864045
    iiR
i����R(	tstript
startswitht
allMatchest_timeREtgrouptlowert
timeValuesthas_keytint(RttimetsigntmatchR((sH/opt/alt/python27/lib/python2.7/site-packages/paste/util/dateinterval.pyR=s
	
)cCs`d}t|�}g}|j||�}x/|r[|j|�|j||j��}q-W|S(s1Return a list of matches for regex in source
    i(tlentsearchtappendtend(tsourcetregextposR(trvR$((sH/opt/alt/python27/lib/python2.7/site-packages/paste/util/dateinterval.pyRYs	
t__main__(t__doc__tret__all__tsecondtminutethourtdaytweektmonthtyearRtitemsRtsorttFalseRtcompileRRRt__name__tdoctestttestmod(((sH/opt/alt/python27/lib/python2.7/site-packages/paste/util/dateinterval.pyt<module>s4






		

https://t.me/AnonymousX5 - 2025