jinks_widgets.time_counter

This file contains the time counter widget class.

Classes

TimeCounter()

Class defining the time vounter widget which counts from or to a certain date.

class jinks_widgets.time_counter.TimeCounter

Bases: object

Class defining the time vounter widget which counts from or to a certain date.

width: int = 12
height: int = 2
color = 'BW'
classmethod time_difference_string(target_datetime, unit='days', reference_datetime=None, decimal_places=None, breakdown_units=0, reverse=False)

Calculate time difference and return as formatted string.

classmethod time_since_string(target_datetime, unit='days', **kwargs)

Calculate time since target_datetime.

classmethod time_until_string(target_datetime, unit='days', **kwargs)

Calculate time until target_datetime (absolute value).

classmethod display(density, date_time, unit, title=None, decimal_places=None, breakdown_units=0, reverse=False, rectangle=False, rectangle_radius=25)

Ran by the jinks_core library to compute data and obtain the widget’s image.

Return type:

<module ‘PIL.Image’ from ‘/usr/local/lib/python3.14/site-packages/PIL/Image.py’>