It is currently December 8th, 2021, 7:04 pm
Help needed with rainmeter calendar
General topics related to Rainmeter.
4 posts
• Page 1 of 1

 Posts: 87
 Joined: June 4th, 2009, 10:41 pm
Help needed with rainmeter calendar
Post by TheAslan »

 Developer
 Posts: 1721
 Joined: July 25th, 2009, 4:47 am

 Posts: 61
 Joined: April 22nd, 2009, 7:46 pm
Re: Help needed with rainmeter calendar
Post by Varelse »
That's by R3ginald. It's from his Arachnid in Black suite. I've played around with it, and ran into the same problem. It works fine, until December. Then it'll show the next month dates highlighted like the current day. I think it has to do with it not taking into account the next month if it's a different year. But I'm not a programmer, and the formula throw me
Here are the measures (slightly modded but with the same error). It friggin' long.
Here are the measures (slightly modded but with the same error). It friggin' long.
Code: Select all
;Begin a slew of helper "functions"
[cShowOtherMonths]
Measure =calc
Formula =(#ShowOtherMonths# = 1) ? 1 : 0
[cCentury] ;mod(century , 4) century assumed 20 for 2000. If this is ever used in the 2100s then change to 21. That's a big if.
Measure =calc
Formula =(20%4)
[mYear] ;Gets current year in ## format. ex: 09
Measure =time
Format =%y
[mMonth] ;Gets current month without leading zero. ex: 9
Measure =time
Format =%#m
[cPrevMonth] ;Current month minus 1. ex: 91
Measure =calc
Formula =mMonth  1
[mDay] ;Gets current day without leading zero. ex 9
Measure =time
Format =%#d
[cLeapYear] ;Returns 1 if leap year or 0 if not
Measure =calc
Formula =((mYear%4 = 0) && (mYear%100 <> 0)  (mYear%400 = 0)) ? 1 : 0
[cMonthCode] ;Returns month "code" according to notes
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 = 1) ? ((mMonth = 1) ? 6 : 2) : ((mMonth = 1) ? 0 : 3))))))))
[cPrevMonthCode];Returns previous month's "code" according to notes. Oh how I wish Rainmeter had bona fide functions.
Measure =calc
Formula =((cPrevMonth = 3)  (cPrevMonth = 11)) ? 3 : (((cPrevMonth = 4)  (cPrevMonth = 7)) ? 6 : ((cPrevMonth = 5) ? 1 : ((cPrevMonth = 6) ? 4 : ((cPrevMonth = 8) ? 2 : (((cPrevMonth = 9)  (cPrevMonth = 12)) ? 5 : ((cPrevMonth = 10) ? 0 : ((cLeapYear = 1) ? ((cPrevMonth = 1) ? 6 : 2) : ((cPrevMonth = 1) ? 0 : 3))))))))
[cMonthStartDay];Determines which day of the week a month starts. Used in week one to turn off days not in the current month
Measure =calc
Formula =(FLOOR((5*mYear)/4)+cMonthCode+1(2*cCentury))%7
[cMonthStart] ;Used to help determine day a month starts. If the day of the week is 0 or Saturday then return 7 (for day 7 in a traditional sense) otherwise return the other "coded" day of the week.
Measure =calc
Formula =(cMonthStartDay = 0) ? 7 : cMonthStartDay
[cDayCount] ;Redundant use to determine total count of days in a month. Used to calculate when to stop displaying days in week 5 or 6. Credit to Jiri Mahel of HUD.Vision.
Measure =calc
Formula =((mMonth = 4)  (mMonth = 6)  (mMonth = 9)  (mMonth = 11)) ? 30 : ((mMonth = 2) ? ((((mYear % 4) = 0) && ((mYear % 100) > 0)) ? 29 : (((mYear % 400) = 0) ? 29 : 28)) : 31)
[cPrevDayCount] ;Similar to DayCount but used to calculate the number of days for the previous month.
Measure =calc
Formula =((cPrevMonth = 4)  (cPrevMonth = 6)  (cPrevMonth = 9)  (cPrevMonth = 11)) ? 30 : ((cPrevMonth = 2) ? ((((mYear % 4) = 0) && ((mYear % 100) > 0)) ? 29 : (((mYear % 400) = 0) ? 29 : 28)) : 31)
[cPrevMonthEndDay] ;Find the day of the week the previous month ends.
Measure =calc
Formula =(FLOOR((5*mYear)/4)+cPrevMonthCode+cPrevDayCount(2*cCentury))%7
[cPrevMonthEnd] ;Find the day of the week the previous month ends.
Measure =calc
Formula =(cPrevMonthEndDay = 0) ? 7 : cPrevMonthEndDay
[cMonthName] ;Shows the name of the month (%B for long name: January, %b for appreviated name: Jan) and the current year (%Y for long year: 2009, %y for short year: 09)
;Could also be modified to include the numerical day (%d for day with leading zero: 05, %#d for day without leading zero: 5)
Measure =time
Format ="%B, %Y"
;Calculate the first week of days
;This assumes Monday is the first day of the week
[cWD0] ;Calc weekday 1 (start)
Measure =calc
Formula =#_sun#FLOOR((5*mYear)/4)cMonthCode+(2*cCentury)7*FLOOR((#_sun#FLOOR((5*mYear)/4)cMonthCode+(2*cCentury))/7)
[cWD1] ;Calc weekday 2
Measure =calc
Formula =#_mon#FLOOR((5*mYear)/4)cMonthCode+(2*cCentury)7*FLOOR((#_mon#FLOOR((5*mYear)/4)cMonthCode+(2*cCentury))/7)
[cWD2] ;Calc weekday 3
Measure =calc
Formula =#_tue#FLOOR((5*mYear)/4)cMonthCode+(2*cCentury)7*FLOOR((#_tue#FLOOR((5*mYear)/4)cMonthCode+(2*cCentury))/7)
[cWD3] ;Calc weekday 4
Measure =calc
Formula =#_wed#FLOOR((5*mYear)/4)cMonthCode+(2*cCentury)7*FLOOR((#_wed#FLOOR((5*mYear)/4)cMonthCode+(2*cCentury))/7)
[cWD4] ;Calc weekday 5
Measure =calc
Formula =#_thu#FLOOR((5*mYear)/4)cMonthCode+(2*cCentury)7*FLOOR((#_thu#FLOOR((5*mYear)/4)cMonthCode+(2*cCentury))/7)
[cWD5] ;Calc weekday 6
Measure =calc
Formula =#_fri#FLOOR((5*mYear)/4)cMonthCode+(2*cCentury)7*FLOOR((#_fri#FLOOR((5*mYear)/4)cMonthCode+(2*cCentury))/7)
[cWD6] ;Calc weekday 7 (end)
Measure =calc
Formula =(#_sat#FLOOR((5*mYear)/4)cMonthCode+(2*cCentury)7*FLOOR((#_sat#FLOOR((5*mYear)/4)cMonthCode+(2*cCentury))/7)) = 0 ? 7 : (#_sat#FLOOR((5*mYear)/4)cMonthCode+(2*cCentury)7*FLOOR((#_sat#FLOOR((5*mYear)/4)cMonthCode+(2*cCentury))/7))
;
1a
;
[cDay00] ;Week 1 Begin
;Day 1 in week 1
Measure =calc
Formula =cWD0
[cDay00Draw]
;Combine drawing the current date or previous month's date.
Measure =calc
Formula =(#_sun# = cMonthStart) ? 1 : ((cShowOtherMonths = 1) && (mMonth <> 1) ? 1 : 0)
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter mDay00][!RainmeterHideMeter mPrevDay00][!RainmeterShowMeter Quote00]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter mDay00][!RainmeterShowMeter mPrevDay00][!RainmeterHideMeter Quote00]
IfEqualValue =0
IfEqualAction =!Execute [!RainmeterHideMeter mDay00][!RainmeterHideMeter mPrevDay00][!RainmeterShowMeter Quote00]
[cPrevMonthDay00]
Measure =calc
Formula =cPrevDayCount  cPrevMonthEnd + #_sun#
[cHL00Draw]
Measure =calc
Formula =(mDay = cDay00) && (cDay00Draw = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL00][!RainmeterHideMeter mDay00]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL00][!RainmeterShowMeter mDay00]
[cDay01]
;Day 2 in week 1
Measure =calc
Formula =cWD1
[cDay01Draw]
Measure =calc
Formula =(cDay00Draw = 1)  (#_mon# = cMonthStart) ? 1 : ((cShowOtherMonths = 1) && (mMonth <> 1) ? 1 : 0)
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter mDay01][!RainmeterHideMeter mPrevDay01][!RainmeterShowMeter Quote01]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter mDay01][!RainmeterShowMeter mPrevDay01][!RainmeterHideMeter Quote01]
IfEqualValue =0
IfEqualAction =!Execute [!RainmeterHideMeter mDay01][!RainmeterHideMeter mPrevDay01][!RainmeterShowMeter Quote01]
[cPrevMonthDay01]
Measure =calc
Formula =cPrevDayCount  cPrevMonthEnd + #_mon#
[cHL01Draw]
Measure =calc
Formula =(mDay = cDay01) && (cDay01Draw = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL01][!RainmeterHideMeter mDay01]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL01][!RainmeterShowMeter mDay01]
[cDay02]
;Day 3 in week 1
Measure =calc
Formula =cWD2
[cDay02Draw]
Measure =calc
Formula =(cDay01Draw = 1)  (#_tue# = cMonthStart) ? 1 : ((cShowOtherMonths = 1) && (mMonth <> 1) ? 1 : 0)
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter mDay02][!RainmeterHideMeter mPrevDay02][!RainmeterShowMeter Quote02]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter mDay02][!RainmeterShowMeter mPrevDay02][!RainmeterHideMeter Quote02]
IfEqualValue =0
IfEqualAction =!Execute [!RainmeterHideMeter mDay02][!RainmeterHideMeter mPrevDay02][!RainmeterShowMeter Quote02]
[cPrevMonthDay02]
Measure =calc
Formula =cPrevDayCount  cPrevMonthEnd + #_tue#
[cHL02Draw]
Measure =calc
Formula =(mDay = cDay02) && (cDay02Draw = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL02][!RainmeterHideMeter mDay02]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL02][!RainmeterShowMeter mDay02]
[cDay03]
;Day 4 in week 1
Measure =calc
Formula =cWD3
[cDay03Draw]
Measure =calc
Formula =(cDay02Draw = 1)  (#_wed# = cMonthStart) ? 1 : ((cShowOtherMonths = 1) && (mMonth <> 1) ? 1 : 0)
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter mDay03][!RainmeterHideMeter mPrevDay03][!RainmeterShowMeter Quote03]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter mDay03][!RainmeterShowMeter mPrevDay03][!RainmeterHideMeter Quote03]
IfEqualValue =0
IfEqualAction =!Execute [!RainmeterHideMeter mDay03][!RainmeterHideMeter mPrevDay03][!RainmeterShowMeter Quote03]
[cPrevMonthDay03]
Measure =calc
Formula =cPrevDayCount  cPrevMonthEnd + #_wed#
[cHL03Draw]
Measure =calc
Formula =(mDay = cDay03) && (cDay03Draw = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL03][!RainmeterHideMeter mDay03]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL03][!RainmeterShowMeter mDay03]
[cDay04]
;Day 5 in week 1
Measure =calc
Formula =cWD4
[cDay04Draw]
Measure =calc
Formula =(cDay03Draw = 1)  (#_thu# = cMonthStart) ? 1 : ((cShowOtherMonths = 1) && (mMonth <> 1) ? 1 : 0)
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter mDay04][!RainmeterHideMeter mPrevDay04][!RainmeterShowMeter Quote04]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter mDay04][!RainmeterShowMeter mPrevDay04][!RainmeterHideMeter Quote04]
IfEqualValue =0
IfEqualAction =!Execute [!RainmeterHideMeter mDay04][!RainmeterHideMeter mPrevDay04][!RainmeterShowMeter Quote04]
[cPrevMonthDay04]
Measure =calc
Formula =cPrevDayCount  cPrevMonthEnd + #_thu#
[cHL04Draw]
Measure =calc
Formula =(mDay = cDay04) && (cDay04Draw = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL04][!RainmeterHideMeter mDay04]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL04][!RainmeterShowMeter mDay04]
[cDay05]
;Day 6 in week 1
Measure =calc
Formula =cWD5
[cDay05Draw]
Measure =calc
Formula =(cDay04Draw = 1)  (#_fri# = cMonthStart) ? 1 : ((cShowOtherMonths = 1) && (mMonth <> 1) ? 1 : 0)
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter mDay05][!RainmeterHideMeter mPrevDay05][!RainmeterShowMeter Quote05]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter mDay05][!RainmeterShowMeter mPrevDay05][!RainmeterHideMeter Quote05]
IfEqualValue =0
IfEqualAction =!Execute [!RainmeterHideMeter mDay05][!RainmeterHideMeter mPrevDay05][!RainmeterShowMeter Quote05]
[cPrevMonthDay05]
Measure =calc
Formula =cPrevDayCount  cPrevMonthEnd + #_fri#
[cHL05Draw]
Measure =calc
Formula =(mDay = cDay05) && (cDay05Draw = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL05][!RainmeterHideMeter mDay05]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL05][!RainmeterShowMeter mDay05]
[cDay06]
;Day 7 in week 1
;If the month hasn't started already then something is really wrong.
Measure =calc
Formula =cWD6
[cDay06Draw]
Measure =calc
Formula =(cDay05Draw = 1)  (#_sat# = cMonthStart) ? 1 : ((cShowOtherMonths = 1) && (mMonth <> 1) ? 1 : 0)
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter mDay06][!RainmeterHideMeter mPrevDay06][!RainmeterShowMeter Quote06]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter mDay06][!RainmeterShowMeter mPrevDay06][!RainmeterHideMeter Quote06]
IfEqualValue =0
IfEqualAction =!Execute [!RainmeterHideMeter mDay06][!RainmeterHideMeter mPrevDay06][!RainmeterShowMeter Quote06]
[cHL06Draw]
Measure =calc
Formula =(mDay = cDay06) && (cDay06Draw = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL06][!RainmeterHideMeter mDay06]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL06][!RainmeterShowMeter mDay06]
[cDay10] ;Week 2 Begin
;Day 1 in week 2
Measure =calc
Formula =cDay06 + 1
[cHL10Draw]
Measure =calc
Formula =(mDay = cDay10) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL10][!RainmeterHideMeter mDay10]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL10][!RainmeterShowMeter mDay10]
[cDay11]
;Day 2 in week 2
Measure =calc
Formula =cDay10 + 1
[cHL11Draw]
Measure =calc
Formula =(mDay = cDay11) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL11][!RainmeterHideMeter mDay11]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL11][!RainmeterShowMeter mDay11]
[cDay12]
;Day 3 in week 2
Measure =calc
Formula =cDay11 + 1
[cHL12Draw]
Measure =calc
Formula =(mDay = cDay12) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL12][!RainmeterHideMeter mDay12]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL12][!RainmeterShowMeter mDay12]
[cDay13]
;Day 4 in week 2
Measure =calc
Formula =cDay12 + 1
[cHL13Draw]
Measure =calc
Formula =(mDay = cDay13) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL13][!RainmeterHideMeter mDay13]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL13][!RainmeterShowMeter mDay13]
[cDay14]
;Day 5 in week 2
Measure =calc
Formula =cDay13 + 1
[cHL14Draw]
Measure =calc
Formula =(mDay = cDay14) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL14][!RainmeterHideMeter mDay14]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL14][!RainmeterShowMeter mDay14]
[cDay15]
;Day 6 in week 2
Measure =calc
Formula =cDay14 + 1
[cHL15Draw]
Measure =calc
Formula =(mDay = cDay15) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL15][!RainmeterHideMeter mDay15]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL15][!RainmeterShowMeter mDay15]
[cDay16]
;Day 7 in week 2
Measure =calc
Formula =cWD6 + 7
[cHL16Draw]
Measure =calc
Formula =(mDay = cDay16) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL16][!RainmeterHideMeter mDay16]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL16][!RainmeterShowMeter mDay16]
[cDay20] ;Week 3 Begin
;Day 1 in week 3
;Keep adding one
;No need to worry about calculating if day exists until 28th
Measure =calc
Formula =cDay16 + 1
[cHL20Draw]
Measure =calc
Formula =(mDay = cDay20) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL20][!RainmeterHideMeter mDay20]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL20][!RainmeterShowMeter mDay20]
[cDay21]
;Day 2 in week 3
Measure =calc
Formula =cDay20 + 1
[cHL21Draw]
Measure =calc
Formula =(mDay = cDay21) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL21][!RainmeterHideMeter mDay21]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL21][!RainmeterShowMeter mDay21]
[cDay22]
;Day 3 in week 3
Measure =calc
Formula =cDay21 + 1
[cHL22Draw]
Measure =calc
Formula =(mDay = cDay22) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL22][!RainmeterHideMeter mDay22]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL22][!RainmeterShowMeter mDay22]
[cDay23]
;Day 4 in week 3
Measure =calc
Formula =cDay22 + 1
[cHL23Draw]
Measure =calc
Formula =(mDay = cDay23) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL23][!RainmeterHideMeter mDay23]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL23][!RainmeterShowMeter mDay23]
[cDay24]
;Day 5 in week 3
Measure =calc
Formula =cDay23 + 1
[cHL24Draw]
Measure =calc
Formula =(mDay = cDay24) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL24][!RainmeterHideMeter mDay24]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL24][!RainmeterShowMeter mDay24]
[cDay25]
;Day 6 in week 3
Measure =calc
Formula =cDay24 + 1
[cHL25Draw]
Measure =calc
Formula =(mDay = cDay25) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL25][!RainmeterHideMeter mDay25]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL25][!RainmeterShowMeter mDay25]
[cDay26]
;Day 7 in week 3
Measure =calc
Formula =cWD6 + 14
[cHL26Draw]
Measure =calc
Formula =(mDay = cDay26) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL26][!RainmeterHideMeter mDay26]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL26][!RainmeterShowMeter mDay26]
[cDay30] ;Week 4 Begin
;Day 1 in Week 4
;No need to worry about calculating if day exists until 28th
Measure =calc
Formula =cDay26 + 1
[cHL30Draw]
Measure =calc
Formula =(mDay = cDay30) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL30][!RainmeterHideMeter mDay30]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL30][!RainmeterShowMeter mDay30]
[cDay31]
;Day 2 in Week 4
Measure =calc
Formula =cDay30 + 1
[cHL31raw]
Measure =calc
Formula =(mDay = cDay31) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL31][!RainmeterHideMeter mDay31]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL31][!RainmeterShowMeter mDay31]
[cDay32]
;Day 3 in Week 4
Measure =calc
Formula =cDay31 + 1
[cHL32Draw]
Measure =calc
Formula =(mDay = cDay32) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL32][!RainmeterHideMeter mDay32]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL32][!RainmeterShowMeter mDay32]
[cDay33]
;Day 4 in Week 4
Measure =calc
Formula =cDay32 + 1
[cHL33Draw]
Measure =calc
Formula =(mDay = cDay33) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL33][!RainmeterHideMeter mDay33]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL33][!RainmeterShowMeter mDay33]
[cDay34]
;Day 5 in Week 4
Measure =calc
Formula =cDay33 + 1
[cHL34Draw]
Measure =calc
Formula =(mDay = cDay34) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL34][!RainmeterHideMeter mDay34]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL34][!RainmeterShowMeter mDay34]
[cDay35]
;Day 6 in Week 4
Measure =calc
Formula =cDay34 + 1
[cHL35Draw]
Measure =calc
Formula =(mDay = cDay35) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL35][!RainmeterHideMeter mDay35]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL35][!RainmeterShowMeter mDay35]
[cDay36]
;Day 7 in Week 4
Measure =calc
Formula =cWD6 + 21
[cHL36Draw]
Measure =calc
Formula =(mDay = cDay36) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterShowMeter TodayHL36][!RainmeterHideMeter mDay36]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter TodayHL36][!RainmeterShowMeter mDay36]
[cDay40] ;Week 5 Begin
;Day 1 in Week 5
Measure =calc
Formula =cDay36 + 1
[cNextMonthDay40]
Measure =calc
Formula =(cDay40 > cDayCount) ? 1 : 0
[cDay40Sort]
Measure =calc
Formula =(cDay40 > cDayCount) ? ((cShowOtherMonths = 1) && (mMonth <> 12) ? 1 : 1) : 0
[cDay40Draw]
Measure =calc
Formula =(cDay40Sort = 0) && (mDay <> cDay40) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter TodayHL40][!RainmeterShowMeter mDay40]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterShowMeter TodayHL40][!RainmeterHideMeter mDay40]
[cPrevMonthDay40]
Measure =calc
Formula =(cDay40Sort = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter mDay40][!RainmeterHideMeter TodayHL40][!RainmeterShowMeter mNextDay40][!RainmeterHideMeter Quote40]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter mNextDay40][!RainmeterShowMeter Quote40]
[cDay41]
;Day 2 in Week 5
Measure =calc
Formula =cDay40 + 1
[cNextMonthDay41]
Measure =calc
Formula =(cDay41 > cDayCount) ? (cNextMonthDay40 + 1) : 0
[cDay41Sort]
Measure =calc
Formula =(cDay41 > cDayCount) ? ((cShowOtherMonths = 1) && (mMonth <> 12) ? 1 : 1) : 0
[cDay41Draw]
Measure =calc
Formula =(cDay41Sort = 0) && (mDay <> cDay41) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter TodayHL41][!RainmeterShowMeter mDay41]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterShowMeter TodayHL41][!RainmeterHideMeter mDay41]
[cPrevMonthDay41]
Measure =calc
Formula =(cDay41Sort = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter mDay41][!RainmeterHideMeter TodayHL41][!RainmeterShowMeter mNextDay41][!RainmeterHideMeter Quote41]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter mNextDay41][!RainmeterShowMeter Quote41]
[cDay42]
;Day 3 in Week 5
Measure =calc
Formula =cDay41 + 1
[cNextMonthDay42]
Measure =calc
Formula =(cDay42 > cDayCount) ? (cNextMonthDay41 + 1) : 0
[cDay42Sort]
Measure =calc
Formula =(cDay42 > cDayCount) ? ((cShowOtherMonths = 1) && (mMonth <> 12) ? 1 : 1) : 0
[cDay42Draw]
Measure =calc
Formula =(cDay42Sort = 0) && (mDay <> cDay42) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter TodayHL42][!RainmeterShowMeter mDay42]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterShowMeter TodayHL42][!RainmeterHideMeter mDay42]
[cPrevMonthDay42]
Measure =calc
Formula =(cDay42Sort = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter mDay42][!RainmeterHideMeter TodayHL42][!RainmeterShowMeter mNextDay42][!RainmeterHideMeter Quote42]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter mNextDay42][!RainmeterShowMeter Quote42]
[cDay43]
;Day 4 in Week 5
Measure =calc
Formula =cDay42 + 1
[cNextMonthDay43]
Measure =calc
Formula =(cDay43 > cDayCount) ? (cNextMonthDay42 + 1) : 0
[cDay43Sort]
Measure =calc
Formula =(cDay43 > cDayCount) ? ((cShowOtherMonths = 1) && (mMonth <> 12) ? 1 : 1) : 0
[cDay43Draw]
Measure =calc
Formula =(cDay43Sort = 0) && (mDay <> cDay43) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter TodayHL43][!RainmeterShowMeter mDay43]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterShowMeter TodayHL43][!RainmeterHideMeter mDay43]
[cPrevMonthDay43]
Measure =calc
Formula =(cDay43Sort = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter mDay43][!RainmeterHideMeter TodayHL43][!RainmeterShowMeter mNextDay43][!RainmeterHideMeter Quote43]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter mNextDay43][!RainmeterShowMeter Quote43]
[cDay44]
;Day 5 in Week 5
Measure =calc
Formula =cDay43 + 1
[cNextMonthDay44]
Measure =calc
Formula =(cDay44 > cDayCount) ? (cNextMonthDay43 + 1) : 0
[cDay44Sort]
Measure =calc
Formula =(cDay44 > cDayCount) ? ((cShowOtherMonths = 1) && (mMonth <> 12) ? 1 : 1) : 0
[cDay44Draw]
Measure =calc
Formula =(cDay44Sort = 0) && (mDay <> cDay44) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter TodayHL44][!RainmeterShowMeter mDay44]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterShowMeter TodayHL44][!RainmeterHideMeter mDay44]
[cPrevMonthDay44]
Measure =calc
Formula =(cDay44Sort = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter mDay44][!RainmeterHideMeter TodayHL44][!RainmeterShowMeter mNextDay44][!RainmeterHideMeter Quote44]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter mNextDay44][!RainmeterShowMeter Quote44]
[cDay45]
;Day 6 in Week 5
Measure =calc
Formula =cDay44 + 1
[cNextMonthDay45]
Measure =calc
Formula =(cDay45 > cDayCount) ? (cNextMonthDay44 + 1) : 0
[cDay45Sort]
Measure =calc
Formula =(cDay45 > cDayCount) ? ((cShowOtherMonths = 1) && (mMonth <> 12) ? 1 : 1) : 0
[cDay45Draw]
Measure =calc
Formula =(cDay45Sort = 0) && (mDay <> cDay45) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter TodayHL45][!RainmeterShowMeter mDay45]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterShowMeter TodayHL45][!RainmeterHideMeter mDay45]
[cPrevMonthDay45]
Measure =calc
Formula =(cDay45Sort = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter mDay45][!RainmeterHideMeter TodayHL45][!RainmeterShowMeter mNextDay45][!RainmeterHideMeter Quote45]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter mNextDay45][!RainmeterShowMeter Quote45]
[cDay46]
;Day 7 in Week 5
Measure =calc
Formula =cWD6 + 28
[cNextMonthDay46]
Measure =calc
Formula =(cDay46 > cDayCount) ? (cNextMonthDay45 + 1) : 0
[cDay46Sort]
Measure =calc
Formula =(cDay46 > cDayCount) ? ((cShowOtherMonths = 1) && (mMonth <> 12) ? 1 : 1) : 0
[cDay46Draw]
Measure =calc
Formula =(cDay46Sort = 0) && (mDay <> cDay46) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter TodayHL46][!RainmeterShowMeter mDay46]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterShowMeter TodayHL46][!RainmeterHideMeter mDay46]
[cPrevMonthDay46]
Measure =calc
Formula =(cDay46Sort = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter mDay46][!RainmeterHideMeter TodayHL46][!RainmeterShowMeter mNextDay46][!RainmeterHideMeter Quote46]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter mNextDay46][!RainmeterShowMeter Quote46]
[cDay50] ;Week 6 Begin
;Day 1 in Week 6
Measure =calc
Formula =cDay46 + 1
[cNextMonthDay50]
Measure =calc
Formula =(cDay50 > cDayCount) ? (cNextMonthDay46 + 1) : 0
[cDay50Sort]
Measure =calc
Formula =(cDay50 > cDayCount) ? ((cShowOtherMonths = 1) && (mMonth <> 12) ? 1 : 1) : 0
[cDay50Draw]
Measure =calc
Formula =(cDay50Sort = 0) && (mDay <> cDay50) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter TodayHL50][!RainmeterShowMeter mDay50]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterShowMeter TodayHL50][!RainmeterHideMeter mDay50]
[cPrevMonthDay50]
Measure =calc
Formula =(cDay50Sort = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter mDay50][!RainmeterHideMeter TodayHL50][!RainmeterShowMeter mNextDay50][!RainmeterHideMeter Quote50]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter mNextDay50][!RainmeterShowMeter Quote50]
[cDay51]
;Day 2 in Week 6
Measure =calc
Formula =cDay50 + 1
[cNextMonthDay51]
Measure =calc
Formula =(cDay51 > cDayCount) ? (cNextMonthDay50 + 1) : 0
[cDay51Sort]
Measure =calc
Formula =(cDay51 > cDayCount) ? ((cShowOtherMonths = 1) && (mMonth <> 12) ? 1 : 1) : 0
[cDay51Draw]
Measure =calc
Formula =(cDay51Sort = 0) && (mDay <> cDay51) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter TodayHL51][!RainmeterShowMeter mDay51]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterShowMeter TodayHL51][!RainmeterHideMeter mDay51]
[cPrevMonthDay51]
Measure =calc
Formula =(cDay51Sort = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter mDay51][!RainmeterHideMeter TodayHL51][!RainmeterShowMeter mNextDay51][!RainmeterHideMeter Quote51]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterHideMeter mNextDay51][!RainmeterShowMeter Quote51]
[cDay52]
;Day 3 in Week 6
Measure =calc
Formula =cDay51 + 1
[cNextMonthDay52]
Measure =calc
Formula =(cDay52 > cDayCount) ? (cNextMonthDay51 + 1) : 0
[cDay52Sort]
Measure =calc
Formula =(cDay52 > cDayCount) ? ((cShowOtherMonths = 1) && (mMonth <> 12) ? 1 : 1) : 0
[cDay52Draw]
Measure =calc
Formula =(cDay52Sort = 0) && (mDay <> cDay52) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter TodayHL52][!RainmeterShowMeter mDay52]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterShowMeter TodayHL52][!RainmeterHideMeter mDay52]
[cPrevMonthDay52]
Measure =calc
Formula =(cDay52Sort = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter mDay52][!RainmeterHideMeter TodayHL52][!RainmeterShowMeter mNextDay52]
IfBelowValue =0
IfBelowAction =!RainmeterHideMeter mNextDay52
[cDay53]
;Day 4 in Week 6
Measure =calc
Formula =cDay52 + 1
[cNextMonthDay53]
Measure =calc
Formula =(cDay53 > cDayCount) ? (cNextMonthDay52 + 1) : 0
[cDay53Sort]
Measure =calc
Formula =(cDay53 > cDayCount) ? ((cShowOtherMonths = 1) && (mMonth <> 12) ? 1 : 1) : 0
[cDay53Draw]
Measure =calc
Formula =(cDay53Sort = 0) && (mDay <> cDay53) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter TodayHL53][!RainmeterShowMeter mDay53]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterShowMeter TodayHL53][!RainmeterHideMeter mDay53]
[cPrevMonthDay53]
Measure =calc
Formula =(cDay53Sort = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter mDay53][!RainmeterHideMeter TodayHL53][!RainmeterShowMeter mNextDay53]
IfBelowValue =0
IfBelowAction =!RainmeterHideMeter mNextDay53
[cDay54]
;Day 5 in Week 6
Measure =calc
Formula =cDay53 + 1
[cNextMonthDay54]
Measure =calc
Formula =(cDay54 > cDayCount) ? (cNextMonthDay53 + 1) : 0
[cDay54Sort]
Measure =calc
Formula =(cDay54 > cDayCount) ? ((cShowOtherMonths = 1) && (mMonth <> 12) ? 1 : 1) : 0
[cDay54Draw]
Measure =calc
Formula =(cDay54Sort = 0) && (mDay <> cDay54) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter TodayHL54][!RainmeterShowMeter mDay54]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterShowMeter TodayHL54][!RainmeterHideMeter mDay54]
[cPrevMonthDay54]
Measure =calc
Formula =(cDay54Sort = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter mDay54][!RainmeterHideMeter TodayHL54][!RainmeterShowMeter mNextDay54]
IfBelowValue =0
IfBelowAction =!RainmeterHideMeter mNextDay54
[cDay55]
;Day 6 in Week 6
Measure =calc
Formula =cDay54 + 1
[cNextMonthDay55]
Measure =calc
Formula =(cDay55 > cDayCount) ? (cNextMonthDay54 + 1) : 0
[cDay55Sort]
Measure =calc
Formula =(cDay55 > cDayCount) ? ((cShowOtherMonths = 1) && (mMonth <> 12) ? 1 : 1) : 0
[cDay55Draw]
Measure =calc
Formula =(cDay55Sort = 0) && (mDay <> cDay55) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter TodayHL55][!RainmeterShowMeter mDay55]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterShowMeter TodayHL55][!RainmeterHideMeter mDay55]
[cPrevMonthDay55]
Measure =calc
Formula =(cDay55Sort = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter mDay55][!RainmeterHideMeter TodayHL55][!RainmeterShowMeter mNextDay55]
IfBelowValue =0
IfBelowAction =!RainmeterHideMeter mNextDay55
[cDay56]
;Day 7 in Week 6
Measure =calc
Formula =cWD6 + 35
[cNextMonthDay56]
Measure =calc
Formula =(cDay56 > cDayCount) ? (cNextMonthDay55 + 1) : 0
[cDay56Sort]
Measure =calc
Formula =(cDay56 > cDayCount) ? ((cShowOtherMonths = 1) && (mMonth <> 12) ? 1 : 1) : 0
[cDay56Draw]
Measure =calc
Formula =(cDay56Sort = 0) && (mDay <> cDay56) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter TodayHL56][!RainmeterShowMeter mDay56]
IfBelowValue =0
IfBelowAction =!Execute [!RainmeterShowMeter TodayHL56][!RainmeterHideMeter mDay56]
[cPrevMonthDay56]
Measure =calc
Formula =(cDay56Sort = 1) ? 1 : 1
IfAboveValue =0
IfAboveAction =!Execute [!RainmeterHideMeter mDay56][!RainmeterHideMeter TodayHL56][!RainmeterShowMeter mNextDay56]
IfBelowValue =0
IfBelowAction =!RainmeterHideMeter mNextDay56

 Rainmeter Sage
 Posts: 642
 Joined: July 19th, 2009, 5:59 am
 Location: Montreal, QC, Canada
Re: Help needed with rainmeter calendar
Post by Alex2539 »
I fixed it. The problem with the days at the end wasn't anything to do with the year, but rather that December is the last month. When it checks to see whether or not the day is in the next month, it also checks whether or not it is supposed to show those extra dates. It checks this by looking for two things: the value of the variable ShowOtherMonths and whether or not it's December. As it turns out, the functionality to hide the days at the end of the month does not work. This would normally go by unnoticed since the default behaviour is to show the dates, but since it is set to be automatically turned off at the end for December, the bug surfaces. I have fixed it so that the extra days are shown regardless of the month, as well as the outstanding bug where the incorrect dates are shown when they should be hidden.
The second problem with the overlapping days on the fist Sunday is something that occured whenever the current date was in the first week. It was merely a problem with the fact that Rainmeter initializes everything to 0 at the start, so somewhere there was a value that wasn't being read properly and as such one of the "Hide" bangs wasn't being fired off. I just added an extra measure that double checks the values to see whether or not that first day needs to be hidden.
Also, I made some other minor tweaks. To start with, the skin assumes that the user is running Windows Vista or 7, that Rainmeter was installed using the default settings and that it is all of the C: drive. Such practice is irresponsible and is the source for a lot of seemingly nonfunctional skins. This has now been fixed so that instead of looking in a specific location for the notes, it looks in the current path, which is where the notes folders should be. The builtin variables exist for a reason, they should be used. There was also a bug similar to the December one occurring in January. For starters, the extra days at the start were always hidden. They now follow the ShowOtherMonths variable. Then, when the days were shown, they were always incorrect. This was because there was no check for January to look for the previous month. It now accurately finds the number of days in December of the previous year, with the last days shown accordingly.
Finally, there was an extra meter for a nonexistent icon that was causing an error in the log. It has been removed.
Oh, and the original author distributed his skin under a Creative Commons AttributionNoncommercialShare Alike 3.0 license so his name and a link back to the original have been added in as comments at the top. It was technically illegal to be distributing this skin without it.
A lot of this ocurred because of the skin maker's lack of proper testing. I know for a fact that this skin is actually a modified version of THIS ONE whch currently comes with Enigma. That skin works fine. When someone tries to modify such an elaborate skin to add functionality, it is the responsibility of that person to test these new features to see if they work properly. Thoroughly. All it takes is to change you computer's date and refresh the skin. These were not hard bugs to notice.
The fixed skin is here:
The second problem with the overlapping days on the fist Sunday is something that occured whenever the current date was in the first week. It was merely a problem with the fact that Rainmeter initializes everything to 0 at the start, so somewhere there was a value that wasn't being read properly and as such one of the "Hide" bangs wasn't being fired off. I just added an extra measure that double checks the values to see whether or not that first day needs to be hidden.
Also, I made some other minor tweaks. To start with, the skin assumes that the user is running Windows Vista or 7, that Rainmeter was installed using the default settings and that it is all of the C: drive. Such practice is irresponsible and is the source for a lot of seemingly nonfunctional skins. This has now been fixed so that instead of looking in a specific location for the notes, it looks in the current path, which is where the notes folders should be. The builtin variables exist for a reason, they should be used. There was also a bug similar to the December one occurring in January. For starters, the extra days at the start were always hidden. They now follow the ShowOtherMonths variable. Then, when the days were shown, they were always incorrect. This was because there was no check for January to look for the previous month. It now accurately finds the number of days in December of the previous year, with the last days shown accordingly.
Finally, there was an extra meter for a nonexistent icon that was causing an error in the log. It has been removed.
Oh, and the original author distributed his skin under a Creative Commons AttributionNoncommercialShare Alike 3.0 license so his name and a link back to the original have been added in as comments at the top. It was technically illegal to be distributing this skin without it.
A lot of this ocurred because of the skin maker's lack of proper testing. I know for a fact that this skin is actually a modified version of THIS ONE whch currently comes with Enigma. That skin works fine. When someone tries to modify such an elaborate skin to add functionality, it is the responsibility of that person to test these new features to see if they work properly. Thoroughly. All it takes is to change you computer's date and refresh the skin. These were not hard bugs to notice.
The fixed skin is here:
large calendar.zip
4 posts
• Page 1 of 1