Skip to content

Isolate hour and minute values #655

Answered by AnthoSweg
AnthoSweg asked this question in Q&A
Discussion options

You must be logged in to vote

Managed to do it !
I modified the stats.py script by adding the following code inside the Date class :

        hour_theme_data = date_theme_data['HOURH']['TEXT']
        display_themed_value(
            theme_data=hour_theme_data,
            value=f"{babel.dates.format_time(date_now, format='HH', locale=lc_time)}"
        )
        
        minute_theme_data = date_theme_data['HOURM']['TEXT']
        display_themed_value(
            theme_data =minute_theme_data,
            value=f"{babel.dates.format_time(date_now, format='mm', locale=lc_time)}"
        )

With that done, inside my theme I can request HOURH for hour and HOURM for minutes (HOUR still exists and return the complete tim…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by AnthoSweg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant