[Rainmeter]
Author=hatbocs@gmail.com || Yus
Update=1000


[BG]
Meter=Image
ImageName=calendar.png
X=0
Y=0

[Variables]
Text.Color2=25,155,255,150
Text.Color=255,255,255,170
pSu.x=72
pMo.x=113
pTu.x=153
pWe.x=193
pTh.x=233
pFr.x=273
pSa.x=313

pW1.y=95
pW2.y=125
pW3.y=155
pW4.y=185
pW5.y=215
pW6.y=245
pxS=40
E.Days=1

;Meter Styles =========================================

;================================

[Meter_LabelMonth]
Meter=String
MeasureName=Measure_LabelMonth
FontFace=Trafaret Kit
FontColor=255,255,255,250
StringAlign=Center
FontSize=12
X=170
Y=30
AntiAlias=1

[TodayHL]
Meter=image
X=([msWeekDay2] - 31)
Y=([msWeek]-2)
H=22
W=30
;SolidColor=55,255,22,100
SolidColor=2,255,2,160
DynamicVariables=1

[pat]
Meter=Image
ImageName=pat.png
X=0
Y=0

[TextStyle]
FontFace=Visitor TT1 BRK
FontSize=15
stringAlign=right
stringStyle=normal
AntiAlias=1

[LabelStyle]
Y=70
FontColor=255,255,255,200
FontFace=Trafaret Kit
FontSize=9
stringAlign=center
stringStyle=bold
AntiAlias=1


;Measures ==============================================
[cCentury]
Measure=calc
Formula=(20%4)

[mYear]
Measure=time
Format=%y

[Measure_LabelMonth]
Measure=time
Format=%b 
Substitute="Dec":"ÄÅÊÀÁÐÜ","Jan":"ßÍÂÂÀÐÜ","Feb":"ÔÅÂÐÀËÜ","Mar":"ÌÀÐÒ","Apr":"ÀÏÐÅËÜ","May":"ÌÀÉ","Jun":"ÈÞÍÜ","Jul":"ÈÞËÜ","Aug":"ÀÂÃÓÑÒ","Sep":"ÑÅÍÒßÁÐÜ","Oct":"ÎÊÒßÁÐÜ","Nov":"ÍÎßÁÐÜ"

[mMonth]
Measure=time
Format=%#m

[mDay]
Measure=time
Format=%#d

[cLeapYear]
Measure=calc
Formula=((mYear%4 = 0) && (mYear%100 <> 0) || (mYear%400 = 0))

[cMonthCode]
Measure=calc
Formula=((mMonth = 3) || (mMonth = 11)) ? 3 : (((mMonth = 4) || (mMonth = 7)) ? 6 : ((mMonth = 5) ? 1 : ((mMonth = 6) ? 4 : ((mMonth = 8) ? 2 : (((mMonth = 9) || (mMonth = 12)) ? 5 : ((mMonth = 10) ? 0 : (cLeapYear ? ((mMonth = 1) ? 6 : 2) : ((mMonth = 1) ? 0 : 3))))))))

[cMonthStartDay]
Measure=calc
Formula=(FLOOR((5*mYear)/4)+cMonthCode+1-(2*cCentury))%7

[cMonthStart]
Measure=calc
Formula=(cMonthStartDay = 0) ? 7 : cMonthStartDay

[mDayCount]
Measure=calc
Formula=((mMonth = 4) || (mMonth = 6) || (mMonth = 9) || (mMonth = 11)) ? 30 : ((mMonth = 2) ? (cLeapYear ? 29 : 28) : 31)

[mDayCount2]
Measure=calc
Formula=((mMonth-1 = 4) || (mMonth-1 = 6) || (mMonth-1 = 9) || (mMonth-1 = 11)) ? 30 : ((mMonth-1 = 2) ? (cLeapYear ? 29 : 28) : 31)

[msWeekNum]
Measure=CALC
Formula=7 - (cMonthStart - 1)

[msWeek]
Measure=CALC
Formula=mDay <= msWeekNum ? #pW1.y# : ((mDay > msWeekNum) && (mDay <= (msWeekNum + 7)) ? #pW2.y#  :((mDay > (msWeekNum +7)) && (mDay <= (msWeekNum + 14)) ? #pW3.y# :((mDay > (msWeekNum +14)) && (mDay <= (msWeekNum + 21)) ? #pW4.y# :((mDay > (msWeekNum +21)) && (mDay <= (msWeekNum + 28)) ? #pW5.y# : #pW6.y#))))

[msWeekDay]
Measure=TIME
Format=%#w

[msWeekDay2]
Measure=CALC
Formula=msWeekDay=0 ? #pSu.x# :(msWeekDay=1 ? #pMo.x# : (msWeekDay=2 ? #pTu.x# : (msWeekDay=3 ? #pWe.x# : (msWeekDay=4 ? #pTh.x# : (msWeekDay=5 ? #pFr.x# : #pSa.x#)))))

;Day of Month Indicator------------------------------------


;Week 1 Begin----------------------------------------------
[cDay00]
;Sunday in week 1
;r = a - n [a/n] where a%n
;Checks if day is less than month start if less than then hide
Measure=calc
Formula=1-FLOOR((5*mYear)/4)-cMonthCode+(2*cCentury)-7*FLOOR((1-FLOOR((5*mYear)/4)-cMonthCode+(2*cCentury))/7)

[cDay00b]
Measure=calc
Formula=(cMonthStart <= 1) ? cDay00 : (cDay00 > 0 ? mDayCount2 + (cDay00 - 7) : mDayCount2)

[cDay00Draw]
Measure=calc
Formula=(cMonthStart <= 1) ? 1 :(#E.Days# = 0 ? 0 : -1)
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay00][!RainmeterShowMeter mDay00b][!RainmeterEnableMeasure cDay00b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay00][!RainmeterHideMeter mDay00b][!RainmeterEnableMeasure cDay00b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay00][!RainmeterHideMeter mDay00b][!RainmeterDisableMeasure cDay00b]

[mDay00]
Meter=string
MeasureName=cDay00b
X=#pSu.x#
Y=#pW1.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay00b]
Meter=string
MeasureName=cDay00b
X=#pSu.x#
Y=#pW1.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#

[cDay01]
;Monday in week 1
Measure=calc
Formula=2-FLOOR((5*mYear)/4)-cMonthCode+(2*cCentury)-7*FLOOR((2-FLOOR((5*mYear)/4)-cMonthCode+(2*cCentury))/7)

[cDay01b]
Measure=calc
Formula=(cMonthStart <= 2) ? cDay01 : (cDay01 > 0 ? mDayCount2 + (cDay01 - 7) : mDayCount2)

[cDay01Draw]
Measure=calc
Formula=(cMonthStart <= 2) ? 1 :(#E.Days# = 0 ? 0 : -1)
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay01][!RainmeterShowMeter mDay01b][!RainmeterEnableMeasure cDay01b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay01][!RainmeterHideMeter mDay01b][!RainmeterEnableMeasure cDay01b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay01][!RainmeterHideMeter mDay01b][!RainmeterDisableMeasure cDay01b]

[mDay01]
Meter=string
MeasureName=cDay01
X=#pMo.x#
Y=#pW1.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay01b]
Meter=string
MeasureName=cDay01b
X=#pMo.x#
Y=#pW1.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#

[cDay02]
;Tuesday in week 1
Measure=calc
Formula=3-FLOOR((5*mYear)/4)-cMonthCode+(2*cCentury)-7*FLOOR((3-FLOOR((5*mYear)/4)-cMonthCode+(2*cCentury))/7)

[cDay02b]
Measure=calc
Formula=(cMonthStart <= 3) ? cDay02 : (cDay02 > 0 ? mDayCount2 + (cDay02 - 7) : mDayCount2)

[cDay02Draw]
Measure=calc
Formula=(cMonthStart <= 3) ? 1 :(#E.Days# = 0 ? 0 : -1)
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay02][!RainmeterShowMeter mDay02b][!RainmeterEnableMeasure cDay02b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay02][!RainmeterHideMeter mDay02b][!RainmeterEnableMeasure cDay02b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay02][!RainmeterHideMeter mDay02b][!RainmeterDisableMeasure cDay02b]

[mDay02]
Meter=string
MeasureName=cDay02b
X=#pTu.x#
Y=#pW1.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay02b]
Meter=string
MeasureName=cDay02b
X=#pTu.x#
Y=#pW1.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#


[cDay03]
;Wednesday in week 1
Measure=calc
Formula=4-FLOOR((5*mYear)/4)-cMonthCode+(2*cCentury)-7*FLOOR((4-FLOOR((5*mYear)/4)-cMonthCode+(2*cCentury))/7)

[cDay03b]
Measure=calc
Formula=(cMonthStart <= 4) ? cDay03 : (cDay03 > 0 ? mDayCount2 + (cDay03 - 7) : mDayCount2)

[cDay03Draw]
Measure=calc
Formula=(cMonthStart <= 4) ? 1 :(#E.Days# = 0 ? 0 : -1)
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay03][!RainmeterShowMeter mDay03b][!RainmeterEnableMeasure cDay03b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay03][!RainmeterHideMeter mDay03b][!RainmeterEnableMeasure cDay03b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay03][!RainmeterHideMeter mDay03b][!RainmeterDisableMeasure cDay03b]

[mDay03]
Meter=string
MeasureName=cDay03b
X=#pWe.x#
Y=#pW1.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay03b]
Meter=string
MeasureName=cDay03b
X=#pWe.x#
Y=#pW1.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#

[cDay04]
;Thursday in week 1
Measure=calc
Formula=5-FLOOR((5*mYear)/4)-cMonthCode+(2*cCentury)-7*FLOOR((5-FLOOR((5*mYear)/4)-cMonthCode+(2*cCentury))/7)

[cDay04b]
Measure=calc
Formula=(cMonthStart <= 5) ? cDay04 : (cDay04 > 0 ? mDayCount2 + (cDay04 - 7) : mDayCount2)

[cDay04Draw]
Measure=calc
Formula=(cMonthStart <= 5) ? 1 :(#E.Days# = 0 ? 0 : -1)
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay04][!RainmeterShowMeter mDay04b][!RainmeterEnableMeasure cDay04b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay04][!RainmeterHideMeter mDay04b][!RainmeterEnableMeasure cDay04b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay04][!RainmeterHideMeter mDay04b][!RainmeterDisableMeasure cDay04b]

[mDay04]
Meter=string
MeasureName=cDay04b
X=#pTh.x#
Y=#pW1.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay04b]
Meter=string
MeasureName=cDay04b
X=#pTh.x#
Y=#pW1.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#

[cDay05]
;Friday in week 1
Measure=calc
Formula=6-FLOOR((5*mYear)/4)-cMonthCode+(2*cCentury)-7*FLOOR((6-FLOOR((5*mYear)/4)-cMonthCode+(2*cCentury))/7)

[cDay05b]
Measure=calc
Formula=(cMonthStart <= 6) ? cDay05 : (cDay05 > 0 ? mDayCount2 + (cDay05 - 7) : mDayCount2)

[cDay05Draw]
Measure=calc
Formula=(cMonthStart <= 6) ? 1 :(#E.Days# = 0 ? 0 : -1)
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay05][!RainmeterShowMeter mDay05b][!RainmeterEnableMeasure cDay05b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay05][!RainmeterHideMeter mDay05b][!RainmeterEnableMeasure cDay05b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay05][!RainmeterHideMeter mDay05b][!RainmeterDisableMeasure cDay05b]

[mDay05]
Meter=string
MeasureName=cDay05b
X=#pFr.x#
Y=#pW1.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay05b]
Meter=string
MeasureName=cDay05b
X=#pFr.x#
Y=#pW1.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#

[cDay06]
;Saturday in week 1
Measure=calc
Formula=(0-FLOOR((5*mYear)/4)-cMonthCode+(2*cCentury)-7*FLOOR((0-FLOOR((5*mYear)/4)-cMonthCode+(2*cCentury))/7)) = 0 ? 7 : (0-FLOOR((5*mYear)/4)-cMonthCode+(2*cCentury)-7*FLOOR((0-FLOOR((5*mYear)/4)-cMonthCode+(2*cCentury))/7))

[cDay06Draw]
Measure=calc
Formula=(cMonthStart <= 7) ? 1 : -1
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay06][!RainmeterHideMeter TodayHL06]
IfAboveValue=0
IfAboveAction=!RainmeterShowMeter mDay06
Disabled=1

[mDay06]
Meter=string
MeasureName=cDay06
X=#pSa.x#
Y=#pW1.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

;Week 2 Begin----------------------------------------------
[cDay10]
;Sunday in week 2
;Try simply adding 1 to Day06
;No need to worry about calculating if day exists until 28th
Measure=calc
Formula=cDay06+1

[mDay10]
Meter=string
MeasureName=cDay10
X=#pSu.x#
Y=#pW2.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[cDay11]
;Monday in week 2
;Try simply adding 1 to previous
Measure=calc
Formula=cDay10+1

[mDay11]
Meter=string
MeasureName=cDay11
X=#pMo.x#
Y=#pW2.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[cDay12]
;Tuesday in week 2
Measure=calc
Formula=cDay11+1

[mDay12]
Meter=string
MeasureName=cDay12
X=#pTu.x#
Y=#pW2.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[cDay13]
;Wednesday in week 2
Measure=calc
Formula=cDay12+1

[mDay13]
Meter=string
MeasureName=cDay13
X=#pWe.x#
Y=#pW2.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[cDay14]
;Thursday in week 2
Measure=calc
Formula=cDay13+1

[mDay14]
Meter=string
MeasureName=cDay14
X=#pTh.x#
Y=#pW2.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[cDay15]
;Friday in week 2
Measure=calc
Formula=cDay14+1

[mDay15]
Meter=string
MeasureName=cDay15
X=#pFr.x#
Y=#pW2.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[cDay16]
;Saturday in week 2
Measure=calc
Formula=cDay15+1

[mDay16]
Meter=string
MeasureName=cDay16
X=#pSa.x#
Y=#pW2.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

;Week 3 Begin----------------------------------------------
[cDay20]
;Sunday in week 3
;Keep adding one
;No need to worry about calculating if day exists until 28th
Measure=calc
Formula=cDay16 + 1

[mDay20]
Meter=string
MeasureName=cDay20
X=#pSu.x#
Y=#pW3.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[cDay21]
;Monday in week 3
Measure=calc
Formula=cDay20 + 1

[mDay21]
Meter=string
MeasureName=cDay21
X=#pMo.x#
Y=#pW3.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[cDay22]
;Tuesday in week 3
Measure=calc
Formula=cDay21 + 1

[mDay22]
Meter=string
MeasureName=cDay22
X=#pTu.x#
Y=#pW3.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[cDay23]
;Wednesday in week 3
Measure=calc
Formula=cDay22 + 1

[mDay23]
Meter=string
MeasureName=cDay23
X=#pWe.x#
Y=#pW3.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[cDay24]
;Thursday in week 3
Measure=calc
Formula=cDay23 + 1

[mDay24]
Meter=string
MeasureName=cDay24
X=#pTh.x#
Y=#pW3.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[cDay25]
;Friday in week 3
Measure=calc
Formula=cDay24 + 1

[mDay25]
Meter=string
MeasureName=cDay25
X=#pFr.x#
Y=#pW3.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[cDay26]
;Saturday in week 3
Measure=calc
Formula=cDay25 + 1

[mDay26]
Meter=string
MeasureName=cDay26
X=#pSa.x#
Y=#pW3.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

;Week 4 Begin----------------------------------------------
[cDay30]
;Sunday in Week 4
;Keep adding one
;No need to worry about calculating if day exists until 28th
Measure=calc
Formula=cDay26 + 1

[mDay30]
Meter=string
MeasureName=cDay30
X=#pSu.x#
Y=#pW4.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[cDay31]
;Monday in Week 4
Measure=calc
Formula=cDay30 + 1

[mDay31]
Meter=string
MeasureName=cDay31
X=#pMo.x#
Y=#pW4.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[cDay32]
;Tuesday in Week 4
Measure=calc
Formula=cDay31 + 1

[mDay32]
Meter=string
MeasureName=cDay32
X=#pTu.x#
Y=#pW4.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[cDay33]
;Wednesday in Week 4
Measure=calc
Formula=cDay32 + 1

[mDay33]
Meter=string
MeasureName=cDay33
X=#pWe.x#
Y=#pW4.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[cDay34]
;Thursday in Week 4
Measure=calc
Formula=cDay33 + 1

[mDay34]
Meter=string
MeasureName=cDay34
X=#pTh.x#
Y=#pW4.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[cDay35]
;Friday in Week 4
Measure=calc
Formula=cDay34 + 1

[mDay35]
Meter=string
MeasureName=cDay35
X=#pFr.x#
Y=#pW4.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[cDay36]
;Saturday in Week 4
Measure=calc
Formula=cDay35 + 1

[mDay36]
Meter=string
MeasureName=cDay36
X=#pSa.x#
Y=#pW4.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[cDay40];Week 5 Begin----------------------------------------------
;Sunday in Week 5
;28th likely to occur so test for 28th
Measure=calc
Formula=cDay36 + 1

[cDay40b]
Measure=calc
Formula=cDay40 > mDayCount ? cDay40-mDayCount : cDay40

[cDay40Draw]
Measure=calc
Formula=(cDay40 > mDayCount) ? (#E.Days# = 0 ? 0 : -1) : 1
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay40][!RainmeterShowMeter mDay40b][!RainmeterEnableMeasure cDay40b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay40][!RainmeterHideMeter mDay40b][!RainmeterEnableMeasure cDay40b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay40][!RainmeterHideMeter mDay40b][!RainmeterDisableMeasure cDay40b]

[mDay40]
Meter=string
MeasureName=cDay40b
X=#pSu.x#
Y=#pW5.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay40b]
Meter=string
MeasureName=cDay40b
X=#pSu.x#
Y=#pW5.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#

[cDay41]
;Monday in Week 5
Measure=calc
Formula=cDay40 + 1

[cDay41b]
Measure=calc
Formula=cDay41 > mDayCount ? cDay41-mDayCount : cDay41

[cDay41Draw]
Measure=calc
Formula=(cDay41 > mDayCount) ? (#E.Days# = 0 ? 0 : -1) : 1
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay41][!RainmeterShowMeter mDay41b][!RainmeterEnableMeasure cDay41b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay41][!RainmeterHideMeter mDay41b][!RainmeterEnableMeasure cDay41b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay41][!RainmeterHideMeter mDay41b][!RainmeterDisableMeasure cDay41b]

[mDay41]
Meter=string
MeasureName=cDay41b
X=#pMo.x#
Y=#pW5.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay41b]
Meter=string
MeasureName=cDay41b
X=#pMo.x#
Y=#pW5.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#

[cDay42]
;Tuesday in Week 5
Measure=calc
Formula=cDay41 + 1

[cDay42b]
Measure=calc
Formula=cDay42 > mDayCount ? cDay42-mDayCount : cDay42

[cDay42Draw]
Measure=calc
Formula=(cDay42 > mDayCount) ? (#E.Days# = 0 ? 0 : -1) : 1
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay42][!RainmeterShowMeter mDay42b][!RainmeterEnableMeasure cDay42b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay42][!RainmeterHideMeter mDay42b][!RainmeterEnableMeasure cDay42b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay42][!RainmeterHideMeter mDay42b][!RainmeterDisableMeasure cDay42b]

[mDay42]
Meter=string
MeasureName=cDay42b
X=#pTu.x#
Y=#pW5.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay42b]
Meter=string
MeasureName=cDay42b
X=#pTu.x#
Y=#pW5.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#

[cDay43]
;Wednesday in Week 5
Measure=calc
Formula=cDay42 + 1

[cDay43b]
Measure=calc
Formula=cDay43 > mDayCount ? cDay43-mDayCount : cDay43

[cDay43Draw]
Measure=calc
Formula=(cDay43 > mDayCount) ? (#E.Days# = 0 ? 0 : -1) : 1
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay43][!RainmeterShowMeter mDay43b][!RainmeterEnableMeasure cDay43b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay43][!RainmeterHideMeter mDay43b][!RainmeterEnableMeasure cDay43b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay43][!RainmeterHideMeter mDay43b][!RainmeterDisableMeasure cDay43b]

[mDay43]
Meter=string
MeasureName=cDay43b
X=#pWe.x#
Y=#pW5.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay43b]
Meter=string
MeasureName=cDay43b
X=#pWe.x#
Y=#pW5.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#

[cDay44]
;Thursday in Week 5
Measure=calc
Formula=cDay43 + 1

[cDay44b]
Measure=calc
Formula=cDay44 > mDayCount ? cDay44-mDayCount : cDay44

[cDay44Draw]
Measure=calc
Formula=(cDay44 > mDayCount) ? (#E.Days# = 0 ? 0 : -1) : 1
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay44][!RainmeterShowMeter mDay44b][!RainmeterEnableMeasure cDay44b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay44][!RainmeterHideMeter mDay44b][!RainmeterEnableMeasure cDay44b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay44][!RainmeterHideMeter mDay44b][!RainmeterDisableMeasure cDay44b]

[mDay44]
Meter=string
MeasureName=cDay44b
X=#pTh.x#
Y=#pW5.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay44b]
Meter=string
MeasureName=cDay44b
X=#pTh.x#
Y=#pW5.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#

[cDay45]
;Friday in Week 5
Measure=calc
Formula=cDay44 + 1

[cDay45b]
Measure=calc
Formula=cDay45 > mDayCount ? cDay45-mDayCount : cDay45

[cDay45Draw]
Measure=calc
Formula=(cDay45 > mDayCount) ? (#E.Days# = 0 ? 0 : -1) : 1
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay45][!RainmeterShowMeter mDay45b][!RainmeterEnableMeasure cDay45b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay45][!RainmeterHideMeter mDay45b][!RainmeterEnableMeasure cDay45b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay45][!RainmeterHideMeter mDay45b][!RainmeterDisableMeasure cDay45b]

[mDay45]
Meter=string
MeasureName=cDay45b
X=#pFr.x#
Y=#pW5.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay45b]
Meter=string
MeasureName=cDay45b
X=#pFr.x#
Y=#pW5.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#

[cDay46]
;Saturday in Week 5
Measure=calc
Formula=cDay45 + 1

[cDay46b]
Measure=calc
Formula=cDay46 > mDayCount ? cDay46-mDayCount : cDay46

[cDay46Draw]
Measure=calc
Formula=(cDay46 > mDayCount) ? (#E.Days# = 0 ? 0 : -1) : 1
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay46][!RainmeterShowMeter mDay46b][!RainmeterEnableMeasure cDay46b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay46][!RainmeterHideMeter mDay46b][!RainmeterEnableMeasure cDay46b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay46][!RainmeterHideMeter mDay46b][!RainmeterDisableMeasure cDay46b]

[mDay46]
Meter=string
MeasureName=cDay46b
X=#pSa.x#
Y=#pW5.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay46b]
Meter=string
MeasureName=cDay46b
X=#pSa.x#
Y=#pW5.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#

;Week 6 Begin----------------------------------------------
[cDay50]
;Sunday in Week 6
;28th likely to occur so test for 28th
Measure=calc
Formula=cDay46 + 1

[cDay50b]
Measure=calc
Formula=cDay50 > mDayCount ? cDay50-mDayCount : cDay50

[cDay50Draw]
Measure=calc
Formula=(cDay50 > mDayCount) ? (#E.Days# = 0 ? 0 : -1) : 1
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay50][!RainmeterShowMeter mDay50b][!RainmeterEnableMeasure cDay50b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay50][!RainmeterHideMeter mDay50b][!RainmeterEnableMeasure cDay50b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay50][!RainmeterHideMeter mDay50b][!RainmeterDisableMeasure cDay50b]

[mDay50]
Meter=string
MeasureName=cDay50b
X=#pSu.x#
Y=#pW6.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay50b]
Meter=string
MeasureName=cDay50b
X=#pSu.x#
Y=#pW6.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#

[cDay51]
;Monday in Week 6
Measure=calc
Formula=cDay50 + 1

[cDay51b]
Measure=calc
Formula=cDay51 > mDayCount ? cDay51-mDayCount : cDay51

[cDay51Draw]
Measure=calc
Formula=(cDay51 > mDayCount) ? (#E.Days# =  0 ? 0 : -1) : 1
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay51][!RainmeterShowMeter mDay51b][!RainmeterEnableMeasure cDay51b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay51][!RainmeterHideMeter mDay51b][!RainmeterEnableMeasure cDay51b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay51][!RainmeterHideMeter mDay51b][!RainmeterDisableMeasure cDay51b]

[mDay51]
Meter=string
MeasureName=cDay51b
X=#pMo.x#
Y=#pW6.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay51b]
Meter=string
MeasureName=cDay51b
X=#pMo.x#
Y=#pW6.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#

[cDay52]
;Tuesday in Week 6
Measure=calc
Formula=cDay51 + 1

[cDay52b]
Measure=calc
Formula=cDay52 > mDayCount ? cDay52-mDayCount : cDay52

[cDay52Draw]
Measure=calc
Formula=(cDay52 > mDayCount) ? (#E.Days# = 0 ? 0 : -1) : 1
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay52][!RainmeterShowMeter mDay52b][!RainmeterEnableMeasure cDay52b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay52][!RainmeterHideMeter mDay52b][!RainmeterEnableMeasure cDay52b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay52][!RainmeterHideMeter mDay52b][!RainmeterDisableMeasure cDay52b]

[mDay52]
Meter=string
MeasureName=cDay52b
X=#pTu.x#
Y=#pW6.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay52b]
Meter=string
MeasureName=cDay52b
X=#pTu.x#
Y=#pW6.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#

[cDay53]
;Wednesday in Week 6
Measure=calc
Formula=cDay52 + 1

[cDay53b]
Measure=calc
Formula=cDay53 > mDayCount ? cDay53-mDayCount : cDay53

[cDay53Draw]
Measure=calc
Formula=(cDay53 > mDayCount) ? (#E.Days#= 0 ? 0 : -1) : 1
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay53][!RainmeterShowMeter mDay53b][!RainmeterEnableMeasure cDay53b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay53][!RainmeterHideMeter mDay53b][!RainmeterEnableMeasure cDay53b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay53][!RainmeterHideMeter mDay53b][!RainmeterDisableMeasure cDay53b]

[mDay53]
Meter=string
MeasureName=cDay53b
X=#pWe.x#
Y=#pW6.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay53b]
Meter=string
MeasureName=cDay53b
X=#pWe.x#
Y=#pW6.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#

[cDay54]
;Thursday in Week 6
Measure=calc
Formula=cDay53 + 1

[cDay54b]
Measure=calc
Formula=cDay54 > mDayCount ? cDay54-mDayCount : cDay54

[cDay54Draw]
Measure=calc
Formula=(cDay54 > mDayCount) ? (#E.Days# = 0 ? 0 : -1) : 1
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay54][!RainmeterShowMeter mDay54b][!RainmeterEnableMeasure cDay54b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay54][!RainmeterHideMeter mDay54b][!RainmeterEnableMeasure cDay54b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay54][!RainmeterHideMeter mDay54b][!RainmeterDisableMeasure cDay54b]

[mDay54]
Meter=string
MeasureName=cDay54b
X=#pTh.x#
Y=#pW6.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay54b]
Meter=string
MeasureName=cDay54b
X=#pTh.x#
Y=#pW6.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#

[cDay55]
;Friday in Week 6
Measure=calc
Formula=cDay54 + 1

[cDay55b]
Measure=calc
Formula=cDay55 > mDayCount ? cDay55-mDayCount : cDay55

[cDay55Draw]
Measure=calc
Formula=(cDay55 > mDayCount) ? ( #E.Days# = 0 ? 0 : -1) : 1
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay55][!RainmeterShowMeter mDay55b][!RainmeterEnableMeasure cDay55b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay55][!RainmeterHideMeter mDay55b][!RainmeterEnableMeasure cDay55b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay55][!RainmeterHideMeter mDay55b][!RainmeterDisableMeasure cDay55b]

[mDay55]
Meter=string
MeasureName=cDay55b
X=#pFr.x#
Y=#pW6.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay55b]
Meter=string
MeasureName=cDay55b
X=#pFr.x#
Y=#pW6.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#

[cDay56]
;Saturday in Week 6
Measure=calc
Formula=cDay55 + 1

[cDay56b]
Measure=calc
Formula=cDay56 > mDayCount ? cDay56-mDayCount : cDay56

[cDay56Draw]
Measure=calc
Formula=(cDay55 + 1 > mDayCount) ? (#E.Days# = 0 ? 0 : -1) : 1
IfBelowValue=0
IfBelowAction=!Execute [!RainmeterHideMeter mDay56][!RainmeterShowMeter mDay56b][!RainmeterEnableMeasure cDay56b]
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter mDay56][!RainmeterHideMeter mDay56b][!RainmeterEnableMeasure cDay56b]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterHideMeter mDay56][!RainmeterHideMeter mDay56b][!RainmeterDisableMeasure cDay56b]

[mDay56]
Meter=string
MeasureName=cDay56b
X=#pSa.x#
Y=#pW6.y#
MeterStyle=TextStyle
FontColor=#Text.Color#

[mDay56b]
Meter=string
MeasureName=cDay56b
X=#pSa.x#
Y=#pW6.y#
MeterStyle=TextStyle
FontColor=#Text.Color2#



;Day Label BG===============================================
[lSun]
Meter=string
Text="ÂÑ"
X=55
MeterStyle=LabelStyle
;FontColor=25,255,2,200

[lMon]
Meter=string
Text="ÏÍ"
X=#pxS#r
MeterStyle=LabelStyle

[lTues]
Meter=string
Text="ÂÒ"
X=#pxS#r
MeterStyle=LabelStyle

[lWed]
Meter=string
Text="ÑÐ"
X=#pxS#r
MeterStyle=LabelStyle

[lThur]
Meter=string
Text="×Ò"
X=#pxS#r
MeterStyle=LabelStyle

[lFri]
Meter=string
Text="ÏÒ"
X=#pxS#r
MeterStyle=LabelStyle

[lSat]
Meter=string
Text="ÑÁ"
X=#pxS#r
MeterStyle=LabelStyle
;FontColor=25,255,2,200