It is currently February 4th, 2023, 3:35 am

Doubt according to the code for dates

Get help with creating, editing & fixing problems with skins
Arturito25
Posts: 2
Joined: August 28th, 2022, 3:24 pm

Doubt according to the code for dates

Post by Arturito25 »

Hello, I have a calendar code to which I want to add and change details, the code it has is basic, it consists of changing an image depending on whether the device time is greater than the assigned one with a calculation of "x < 21", I want to be able to leave this like this but add one that works both for a time less than 4:00 p.m. and only on specific dates, and that even being on those specific dates there are two days (Saturday and Sunday) that this is not activated (Let the same command that is active outside these dates do it)

Thank you.

Code: Select all

[measureHour]
Measure=Time
Format=%H

;Calculates time of day, explanation at the bottom
[TimeOfDayMeasure]
Measure=Calc
DynamicVariables=1
Formula=[measureHour] < 1 ? 1 : ([measureHour]<7 ? 2 : ([measureHour]<11 ? 3 : ([MeasureHour]<14 ? 4 : ([measureHour]<19 ? 5 : ([measureHour]<21 ? 6 : 1)))))
;   1 - Evening
;   2 - Early Morning
;   3 - Morning
;   4 - Daytime
;   5 - Afternoon
;   6 - Evening
User avatar
tass_co
Posts: 433
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: Doubt according to the code for dates

Post by tass_co »

Arturito25 wrote: August 28th, 2022, 3:32 pm Hello, I have a calendar code to which I want to add and change details, the code it has is basic, it consists of changing an image depending on whether the device time is greater than the assigned one with a calculation of "x < 21", I want to be able to leave this like this but add one that works both for a time less than 4:00 p.m. and only on specific dates, and that even being on those specific dates there are two days (Saturday and Sunday) that this is not activated (Let the same command that is active outside these dates do it)

Thank you.
MeaTime consists of 6 conditions according to the clock status.
MeaSatSunDay turns off MeaTime measure on Saturday and Sunday.

Code: Select all

[MeaTime]
Measure=Time
Format=%H
IfCondition=((MeaTime >= 1)&&(MeaTime < 7))
IfTrueAction=;   1 - Evening
IfCondition2=((MeaTime >= 7)&&(MeaTime < 11))
IfTrueAction2=;   2 - Early Morning
IfCondition3=((MeaTime >= 11)&&(MeaTime < 14))
IfTrueAction3=;   3 - Morning
IfCondition4=((MeaTime >= 14)&&(MeaTime < 19))
IfTrueAction4=;   4 - Daytime
IfCondition5=((MeaTime >= 19)&&(MeaTime < 21))
IfTrueAction5=;   5 - Afternoon
IfCondition6=((MeaTime >= 21)||(MeaTime < 1))
IfTrueAction6=;   6 - Evening


[MeaSatSunDay]
Measure=Time
Format=%A
IfMatch=Saturday|Sunday
IfMatchAction=[!DisableMeasure MeaTime]
IfNotMatchAction=[!EnableMeasure MeaTime]
IfMatchMode=1
I don't know where i going from here, but i promise it won't be boring... :great:
Arturito25
Posts: 2
Joined: August 28th, 2022, 3:24 pm

Re: Doubt according to the code for dates

Post by Arturito25 »

Thank you very much, but I forgot to specify that the numbers after the "?" are the number of the image that I want to be displayed (Specifically, every few hours the "Daytime" changes [https://i.imgur.com/Qm2DfF6.png]) And that is why I would like another image to be displayed during Monday to Friday that replaces "Afternoon" and that from Saturday to Sunday it becomes "Afternoon" again, if it is possible to mark that from September 10 to June 23 this happens, from June 24 to September 9 are all the days with "Afternoon" (Surely this is very basic, I'm not familiar with the matter)

If you need the full code I'll pass it on
User avatar
balala
Rainmeter Sage
Posts: 14935
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Doubt according to the code for dates

Post by balala »

Arturito25 wrote: August 29th, 2022, 11:17 am Thank you very much, but I forgot to specify that the numbers after the "?" are the number of the image that I want to be displayed (Specifically, every few hours the "Daytime" changes [https://i.imgur.com/Qm2DfF6.png]) And that is why I would like another image to be displayed during Monday to Friday that replaces "Afternoon" and that from Saturday to Sunday it becomes "Afternoon" again, if it is possible to mark that from September 10 to June 23 this happens, from June 24 to September 9 are all the days with "Afternoon" (Surely this is very basic, I'm not familiar with the matter)
I definitely couldn't follow what exactly you want, so please help me to understand.
This is what I understood:
  • From June 24 to September 9:
    • For all days of the week, you would like to get shown certain set of images for each of the specified hour interval (evening, early morning and so on).
  • From September 10 to June 23:
    • From Monday to Friday you need certain images for each interval.
    • For Saturday and Sunday, another set of images should be shown for each interval.
Is this correct? If not, please let me know what did I misunderstand.
User avatar
tass_co
Posts: 433
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: Doubt according to the code for dates

Post by tass_co »

I didn't understand exactly what Arturito25 wanted, it's because my English is not so good :oops:
We can help you better if you state your requests in bullet points :thumbup:
I don't know where i going from here, but i promise it won't be boring... :great: