
     h4              
           d dl Z d dlZd dlmZ d dlmZ d dlmZmZ  eddd           edd	d           ed
dd           eddd           eddd           eddd          dZ	dZ
ddZddZdS )    N)avoid_wrapping)is_aware)gettextngettext_lazyz%(num)d yearz%(num)d years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)yearmonthweekdayhourminute))i3r   )i ' r	   )i:	 r
   )iQ r   )i  r   )<   r   F   c                 :   |t           }|dk    rt          d          t          | t          j                  s%t          j        | j        | j        | j                  } |r?t          |t          j                  s%t          j        |j        |j        |j                  }|p>t          j                            t          |           rt          j	        j
        nd          }|r|| }} || z
  }t          j        | j        |j                  }|dk    r=t          j        | j                  r|dz  }nt          j        |j                  r|dz  }|t          j        |          z  }|j        dz  dz  dz  |j        z   }|dk    rt#          |d         ddiz            S t%          t&                    D ]\  }\  }	}
||	z  }|dk    r nt#          |d         ddiz            S g }d}|t)          t&                    k     r||k     ryt&          |         \  }	}
||	z  }|dk    rn]|                    t#          ||
         d|iz                       ||	|z  z  }|dz  }|dz  }|t)          t&                    k     r||k     yt-          d	                              |          S )
a  
    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. 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.

    Adapted from
    https://web.archive.org/web/20060617175230/http://blog.natbat.co.uk/archive/2003/Jun/14/time_since
    Nr   zdepth must be greater than 0.      r   r   r   z, )TIME_STRINGS
ValueError
isinstancedatetimer   r	   r   nowr   timezoneutccalendarleapdaysisleap	timedeltadayssecondsr   	enumerateTIMESINCE_CHUNKSlenappendr   join)dr   reversedtime_stringsdepthdeltar   sinceir   namecountresultcurrent_depths                 R/var/www/html/Sam_Eipo/venv/lib/python3.11/site-packages/django/utils/timesince.py	timesincer1      s   ( #zz8999a*++ 6afagqu55
 >:c8#455 >#)SW==

V"&&'Ux'8'<'<QUVVC a3!GE  22H1}}?16"" 	MHH_SX&& 	MH	X)))E JOb 2%5Ezzl84qzABBB'(899 C C?GT A::E  l84qzABBBFM
c"##
#
#(=(=(+ A::n\$%75%.%HIIJJJ5 	Q c"##
#
#(=(= 4==f%%%    c                 *    t          | |d||          S )zV
    Like timesince, but return a string measuring the time until the given time.
    T)r&   r'   r(   )r1   )r%   r   r'   r(   s       r0   	timeuntilr4   a   s     QdUSSSSr2   )NFNr   )NNr   )r   r   django.utils.htmlr   django.utils.timezoner   django.utils.translationr   r   r   r!   r1   r4    r2   r0   <module>r9      s     , , , , , , * * * * * * ; ; ; ; ; ; ; ; M./5AA]?,<eDDM./5AA=>>M./5AAm,.?GG  C& C& C& C&LT T T T T Tr2   