Create a global function turning time from any entity into a more human time

I’ve made an entity that converts time into a more human form: Human spoken time - Share your Projects! - Home Assistant Community (home-assistant.io)
Is there a way so I can use this concept as a function that allows me to convert any time into “human spoken time”?

I’ve read How to write less repetitive code? Is there a way to define a function? - Configuration - Home Assistant Community (home-assistant.io). This is an interesting approach but it requires to call a service define the speakers it should use etc. beforehand. The macro approach isn’t what I’m looking for because I want this function to exist globally.

Can you create a “function” in HA to simpliy Automation.yaml? - Configuration - Home Assistant Community (home-assistant.io) this isn’t something I want because I have to define all entities beforehand.

The general idea is: function(time_of_entity_to_be_parsed)

Home Assistant doesn’t currently support user-defined global Jinja2 functions (i.e. global macros)

It looks like this is now supported in 2023.4+

@bsell93 Thanks for the input. In my quest on learning more on this subject I stumbled upon GitHub - Petro31/easy-time-jinja: Easy Time calculations for Home Assistant templates it’s a very interesting project.