As an example, it calculates to New Year's Day. I would like it to automatically calculate to the next New Year's Day once the new year arrives without me having to update the year. I figured I would try to use Substitute to replace current year of event date with following year, but am stuck as I just don't understand RegExp. Or maybe there's another way I haven't discovered yet...
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
EventDateTime="2017-01-01 00:00:00"
[mTime]
Measure=Time
[mYear]
Measure=Time
Format="%Y"
[mNextYear]
Measure=Calc
Formula=mYear+1
[mEventTimeRecur]
Measure=STRING
String=#EventDateTime#
RegExpSubstitute=1
Substitute="^(.{0,4}).+$":"\1[mNextYear]"
;I know the above line is wrong. I just don't understand RegExp
DynamicVariables=1
[mEventTime]
Measure=Time
TimeStamp=[mEventTimeRecur]
;TimeStamp=#EventDateTime#
TimeStampFormat="%Y-%m-%d %H:%M:%S"
Format="%Y-%m-%d %H:%M:%S"
DynamicVariables=1
[mEventDiff]
Measure=Uptime
SecondsValue=(Max(0, [mEventTime:timestamp] - [mTime:timestamp]))
Format="%4!01i!:%3!02i!:%2!02i!:%1!02i!"
DynamicVariables=1
[MeterCountdown]
Meter=String
MeasureName=mEventTimeRecur
MeasureName2=mTime
MeasureName3=mEventDiff
FontSize=12
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Target: %1#CRLF#Current: %2#CRLF#Countdown: %3