Is there a current day of month block?

id: 751403

category: Help with Scripts

posts: 11

I'm trying to make a project where something will trigger on a certain day/holiday, say like Easter, Christmas, etc. But there isn't a current day of month block or anything similar, and I can't figure out what to do. Is there a workaround for this? Something I can do that would work the same way? I've done everything I could think of, including the current date block, but I can't figure out how that block works either, so if someone could help with that, that would be nice, too.
lgrov44 lgrov44 loading
Well, there are “current month” and “current date” blocks, so with that, you can find the day of month or day and month.
Also, the “current date” block works by telling you, well, the date. The dropdown menu also has year, month, etc. It will tell you that as well. If you are unsure, just check your time and date, then see what the number you get corresponds with.
What would I enter in the current date block? Like 4/31, March 31, 4/31/24, etc? I'm trying to have something trigger on Easter every year, so I couldn't just put the blocks to make it trigger on any Sunday of March, if you know what I mean. Sorry for all the questions!
lgrov44 lgrov44 loading
You would have to enter it independently. The date, then the month, like so:
<<(current [date v]) = [31]> and <(current [month v]) = [3]>>
This checks whether it is easter (31st of March).
Oh! Thanks so much! That helps a lot!
lgrov44 lgrov44 loading

BrightCloud33 wrote:

Oh! Thanks so much! That helps a lot!
You're welcome.
deck26 deck26 loading
current day of week will allow you to detect Sundays but Easter isn't a fixed date or even a fixed Sunday (eg third Sunday) in a month. So triggering on Easter every year is non-trivial. Easter Sunday is actually the first Sunday after the first full moon after the spring equinox. That means it can occur on any of around 4 or 5 Sundays after 21 March depending on the phases of the moon.

You best bet would actually be to do some research and get the date for Easter Sunday for the next 10 years or so and load that into your project.
medians medians loading
Also, there is year, day of the week (1 = Sunday and 7 = Saturday), hour, minute, and second.
The current block is in the user's timezone, while days since 2000 is always in GMT or UTC (days since 2000 reports the time since January 1, 2000 at 00:00:00)
Malicondi Malicondi loading

lgrov44 wrote:

You would have to enter it independently. The date, then the month, like so:
<<(current [date v]) = [31]> and <(current [month v]) = [3]>>
This checks whether it is easter (31st of March).
there's an automated method for every easter, rather than this one. Use this:
if <<(current [day of the month v]) = (1)>and <<(current [month v]) = (3)> and <(current [date v]) > (24)>>> then
say [it's easter!!]
done
if you want to make it so that it triggers every Sunday of march, you could use this
<<(current [month]) = [3]> and <(current [day of week]) = [1]>>
@Igrov44 helped, it's all good now! Thanks to everyone else for trying to help though! I'll change it if Easter isn't always on the 31, but for now it's working ^^