It is currently December 15th, 2019, 6:35 am

Time to Fall Back in the US

Post your work-in-progress and completed skins to share and discuss.
User avatar
jsmorley
Developer
Posts: 19870
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Time to Fall Back in the US

jsmorley » November 2nd, 2019, 3:00 pm

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
BackgroundMode=2
SolidColor=20,30,40,255
SolidColor2=30,40,50,255
AccurateText=1

[Metadata]
Name=TimeZone
Author=JSMorley
Information=Demonstration of the new Time Zone / Daylight Saving Time functionality.
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Version=Feb 8, 2015

; Measures

[MeasureNow]
Measure=Time
Format=%A, %B %#d, %Y at %#I:%M:%S %p

[MeasureYear]
Measure=Time
Format=%Y

[MeasureTimeZoneISDST]
Measure=Plugin
Plugin=SysInfo
SysInfoType=TIMEZONE_ISDST
UpdateDivider=60
IfCondition=MeasureTimeZoneISDST = 1
IfTrueAction=[!SetOption MeterTimeZone MeasureName "MeasureTimeZoneDaylightName"][!SetOption MeterDSTNextChange Text "Daylight Saving Time will end#CRLF#[*MeasureDSTNextEnd*]"]
IfCondition2=MeasureTimeZoneISDST = 0
IfTrueAction2=[!SetOption MeterTimeZone MeasureName "MeasureTimeZoneStandardName"][!SetOption MeterDSTNextChange Text "Daylight Saving Time will start#CRLF#[*MeasureDSTNextStart*]"]
IfCondition3=MeasureTimeZoneISDST = -1
IfTrueAction3=[!SetOption MeterTimeZone MeasureName "MeasureTimeZoneStandardName"][!HideMeterGroup TimeZone]
OnChangeAction=[!UpdateMeasureGroup TimeZone][!UpdateMeter *][!Redraw]

[MeasureTimeZoneBias]
Measure=Plugin
Plugin=SysInfo
Group=TimeZone
SysInfoType=TIMEZONE_BIAS
UpdateDivider=-1

[MeasureDSTStandardBias]
Measure=Plugin
Plugin=SysInfo
Group=TimeZone
SysInfoType=TIMEZONE_STANDARD_BIAS
UpdateDivider=-1

[MeasureDSTDaylightBias]
Measure=Plugin
Plugin=SysInfo
Group=TimeZone
SysInfoType=TIMEZONE_DAYLIGHT_BIAS
UpdateDivider=-1

[MeasureDSTCurrentBias]
Measure=Calc
Group=TimeZone
Formula=MeasureTimeZoneISDST = 1 ? MeasureDSTDaylightBias : MeasureDSTStandardBias 
UpdateDivider=-1

[MeasureCalcBiasHours]
Measure=Calc
Group=TimeZone
Formula=0-(trunc((MeasureTimeZoneBias + MeasureDSTCurrentBias) / 60))
RegExpSubstitute=1
Substitute="^([\d]{1,2})$":"+\1","^([+-]{1})(\d)$":"\10\2"
UpdateDivider=-1

[MeasureCalcBiasMinutes]
Measure=Calc
Group=TimeZone
Formula=Abs(60 * (frac(MeasureTimeZoneBias / 60)))
RegExpSubstitute=1
Substitute="^(\d)$":"\10"
UpdateDivider=-1

[MeasureTimeZoneStandardName]
Measure=Plugin
Plugin=SysInfo
Group=TimeZone
SysInfoType=TIMEZONE_STANDARD_NAME
UpdateDivider=-1
RegExpSubstitute=1
Substitute="^(.*)$":"\1 [UTC [MeasureCalcBiasHours]:[MeasureCalcBiasMinutes]]"
DynamicVariables=1

[MeasureTimeZoneDaylightName]
Measure=Plugin
Plugin=SysInfo
Group=TimeZone
SysInfoType=TIMEZONE_DAYLIGHT_NAME
UpdateDivider=-1
RegExpSubstitute=1
Substitute="^(.*)$":"\1 [UTC [MeasureCalcBiasHours]:[MeasureCalcBiasMinutes]]"
DynamicVariables=1

[MeasureDSTStartThisYear]
Measure=Time
Group=TimeZone
TimeStamp=DSTStart
Format=%A, %B %#d, %Y at %#I:%M:%S %p
UpdateDivider=-1

[MeasureDSTEndThisYear]
Measure=Time
Group=TimeZone
TimeStamp=DSTEnd
Format=%A, %B %#d, %Y at %#I:%M:%S %p
UpdateDivider=-1

[MeasureDSTStartNextYear]
Measure=Time
Group=TimeZone
TimeStamp=DSTStart([MeasureYear]+1)
Format=%A, %B %#d, %Y at %#I:%M:%S %p
UpdateDivider=-1

[MeasureDSTEndNextYear]
Measure=Time
Group=TimeZone
TimeStamp=DSTEnd([MeasureYear]+1)
Format=%A, %B %#d, %Y at %#I:%M:%S %p
UpdateDivider=-1

[MeasureDSTNextStart]
Measure=Time
Group=TimeZone
TimeStamp=DSTNextStart
Format=%A, %B %#d, %Y at %#I:%M:%S %p
UpdateDivider=-1

[MeasureDSTNextEnd]
Measure=Time
Group=TimeZone
TimeStamp=DSTEnd
Format=%A, %B %#d, %Y at %#I:%M:%S %p
UpdateDivider=-1

; Meters

[MeterNow]
Meter=String
MeasureName=MeasureNow
X=0
Y=0
FontSize=12
FontColor=230,240,250,255
Padding=10,10,0,0
AntiAlias=1

[MeterTimeZone]
Meter=String
X=0
Y=10R
FontSize=11
FontColor=230,240,250,255
Padding=10,0,10,0
AntiAlias=1

[MeterDSTNextChange]
Meter=String
Group=TimeZone
X=0
Y=10R
FontSize=11
FontColor=230,240,250,255
Padding=10,0,10,0
AntiAlias=1

[MeterDSTThisYear]
Meter=String
Group=TimeZone
MeasureName=MeasureDSTStartThisYear
MeasureName2=MeasureDSTEndThisYear
X=0
Y=10R
FontSize=11
FontColor=230,240,250,255
Padding=10,0,10,0
AntiAlias=1
Text=This year's Daylight Saving Time changes:#CRLF#Start	%1#CRLF#End	%2

[MeterDSTNext]
Meter=String
Group=TimeZone
MeasureName=MeasureDSTStartNextYear
MeasureName2=MeasureDSTEndNextYear
X=0
Y=10R
FontSize=11
FontColor=230,240,250,255
Padding=10,0,10,10
AntiAlias=1
Text=Next year's Daylight Saving Time changes:#CRLF#Start	%1#CRLF#End	%2

1.jpg

2.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
SilverAzide
Posts: 617
Joined: March 23rd, 2015, 5:26 pm

Re: Time to Fall Back in the US

SilverAzide » November 4th, 2019, 1:02 pm

jsmorley wrote:
November 2nd, 2019, 3:00 pm
Is there a button I can press to delete Daylight Saving Time altogether? (Or enable it permanently?) Or does that require a plug-in?
DeviantArt Gadgets More...
User avatar
jsmorley
Developer
Posts: 19870
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Time to Fall Back in the US

jsmorley » November 4th, 2019, 1:05 pm

SilverAzide wrote:
November 4th, 2019, 1:02 pm
Is there a button I can press to delete Daylight Saving Time altogether? (Or enable it permanently?) Or does that require a plug-in?
Elections have consequences...