I am completely new to Rainmeter and it's configuration files, however it seems to be the perfect application for what I want to do.
There are a few 'grid' layout word clocks - that is clocks that tell the time in natural language (ie. "it's ten to five in the afternoon") - but none I found simply gave the time as a single string.
Scavenging code from other projects and struggling through help files I managed to frankenstein this input;
Code: Select all
[Variables]
minutes=%M
hours=%H
Code: Select all
[MeasureTime]
Measure=Time
Format=It is M#minutes# H#hours#.
Substitute="M00":"","M01":"","M02":"","M03":"five after","M04":"five after","M05":"five after","M06":"five after","M07":"five after","M08":"ten after","M09":"ten after","M10":"ten after","M11":"ten after","M12":"ten after","M13":"a quarter after","M14":"a quarter after","M15":"a quarter after","M16":"a quarter after","M17":"a quarter after","M18":"twenty after","M19":"a quarter after","M20":"a quarter after","M21":"a quarter after","M22":"a quarter after","M23":"twenty-five after","M24":"twenty-five after","M25":"twenty-five after","M26":"twenty-five after","M27":"twenty-five after","M28":"half past","M29":"half past","M30":"half past","M31":"half past","M32":"half past","M33":"half past","M34":"thirty five after","M35":"thirty five after","M36":"thirty five after","M37":"thirty five after","M38":"twenty to","M39":"twenty to","M40":"twenty to","M41":"twenty to","M42":"twenty to","M43":"twenty to","M44":"a quarter to","M45":"a quarter to","M46":"a quarter to","M47":"a quarter to","M48":"ten to","M49":"ten to","M50":"ten to","M51":"ten to","M52":"ten to","M53":"ten to","M54":"five to","M55":"five to","M56":"five to","M57":"five to","M58":"","M59":"","H01":"one in the morning","H02":"two in the morning","H03":"three in the morning","H04":"four in the morning","H05":"five in the morning","H06":"six in the morning","H07":"seven in the morning","H08":"eight in the morning","H09":"nine in the morning","H10":"ten in the morning","H11":"eleven in the morning","H12":"noon","H13":"one in the afternoon","H14":"two in the afternoon","H15":"three in the afternoon","H16":"four in the afternoon","H17":"five in the afternoon","H18":"six in the evening","H19":"seven in the evening","H20":"eight in the evening","H21":"nine at night","H22":"ten at night","H23":"eleven at night","H00":"midnight"
I'm certain this isn't the optimum way of doing this, but I don't know any better at this point, and the end result is satisfactory... however where I run into a problem is when I run over my 35 minute mark each hour, and the hour would ideally increment by one so that it would read "twenty to four" at 3:40 instead of "twenty to three" which is the parse of 3:40 outright. I can't for the life of me figure out how to increment the hour by 1 if the minutes go past 35.
I tried something like this
Code: Select all
[increment]
measure=calc
formula= #minutes# > 35 ? #hours# : (#hours# + 1)
Could anyone give me some guidance as to how I might do this?