
    MgM                         S SK J r   S SKJr  S SKJr  S SKr\R                  S4S jr\ " S5      S 5       r\ " S	5      S
 5       r	g)    )plugin)Fore)Timedelta_utilitiesNTc                 4   [         R                   R                  5       nU(       a!  XR:  a  UR                  UR                  S-   S9nU(       d  XR:  a  U R	                  SU S35        gX%-
  nU R	                  S[
        R                  " U5       SU 3U5        g)ac  
Tells the time until a target event.
Args:
    jarvis: jarvis parser.
    event_name (string): the name of the target event.
    target_datetime (datetime.datetime): the datetime of the event.
    color (Fore): optional text color modifier.
    check_year (bool): if not targeting a particular year,
    reset the date if the event has already happened.
   )yearzEvent z has already occurred.zIt's z until N)datetimetodayreplacer   sayr   format_time_delta)jarvis
event_nametarget_datetimecolor
check_yearactual_datetimetime_until_events          A/Users/admin/workspace/ai/Jarvis/jarviscli/plugins/event_timer.py	basetimerr      s     ''--/O,-55$))A- 6 /O/;

VJ<'=>?*<

(::;KLMj\#$)	+    zchristmas timerc                     [         R                   R                  5       n[         R                   " UR                  SSSSS5      n[        U SU[        R
                  5        g)z'
Tells remaining time until Christmas.
         ;   	ChristmasN)r	   r
   r   r   r   GREEN)r   sr   christmas_times       r   christmastimerr!   "   sM    
 ''--/O&&b"b"b2Nfk>4::>r   	endofyearc                     [         R                   R                  5       n[         R                   " UR                  SSSSS5      n[        U SU5        g)z1
Tells remaining time until the end of the year.
r      r   r   zEnd of the YearN)r	   r
   r   r   )r   r   r   end_of_years       r   endofyeartimerr&   -   sE    
 ''--/O##O$8$8"b"b"MKf'5r   )
r   coloramar   utilities.timedeltaUtilitiesr   r	   YELLOWr   r!   r&    r   r   <module>r+      sU      <  :>+6 ? ? 6 6r   