It is currently December 7th, 2022, 11:33 pm

Relative Time Measure

Report bugs with the Rainmeter application and suggest features.
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Relative Time Measure

Post by Kaelri »

I've been working on this Calendar, and the underlying math is giving me a bit of trouble. I thought of another method I could use with a bit of extra flexibility in the Time measure.

Something like this:

Code: Select all

[MeasureTime]
Measure=Time
Adjust=+1d
Which would return the time value of one day in the future.
Rorix
Developer
Posts: 21
Joined: April 3rd, 2009, 3:47 am
Location: New Zealand

Re: Relative Time Measure

Post by Rorix »

Give this modified rainmeter.dll a try (code changes up to r116 included).

http://www.mediafire.com/?m0uwimzjntw

Adds an 'Adjust' setting to the time measure. Offsets the current date by the number of days specified (negative values supported).

e.g.

Code: Select all

[MeasureTime]
Measure=Time
Adjust=1
Format=%d
This will display the day of the month of tomorrow. I have tested it a bit and so far everything works including month changes, year changes and leap years.

I'm not sure if this will help you in making your calendar since it's relative to today so every day you'll get a new 'week' displayed.