Discuss Scratch

BrightCloud33
Scratcher
6 posts

Is there a current day of month block?

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.

Last edited by BrightCloud33 (March 31, 2024 14:04:04)

lgrov44
Scratcher
500+ posts

Is there a current day of month block?

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.

lgrov44, an Australian Scratcher whose most famous for his follows, followed by his activity, especially on Discussion Forums, and his follower count. Is also a remix chainer and school student. Identifies as bisexual.

My top 3 favourite people:
1. @Higgies (deleted) - First Follower, Thank you so much! (Wish you could see this…)
2. @Dubstepv1 (Banned/Moved) - Remix Chainer
3. @GIitchInTheMatrix (Moved to @GlitchedThrough) - Many small things.
Still looking for one of my first followers who are still active.
BrightCloud33
Scratcher
6 posts

Is there a current day of month block?

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
Scratcher
500+ posts

Is there a current day of month block?

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).

lgrov44, an Australian Scratcher whose most famous for his follows, followed by his activity, especially on Discussion Forums, and his follower count. Is also a remix chainer and school student. Identifies as bisexual.

My top 3 favourite people:
1. @Higgies (deleted) - First Follower, Thank you so much! (Wish you could see this…)
2. @Dubstepv1 (Banned/Moved) - Remix Chainer
3. @GIitchInTheMatrix (Moved to @GlitchedThrough) - Many small things.
Still looking for one of my first followers who are still active.
BrightCloud33
Scratcher
6 posts

Is there a current day of month block?

Oh! Thanks so much! That helps a lot!
lgrov44
Scratcher
500+ posts

Is there a current day of month block?

BrightCloud33 wrote:

Oh! Thanks so much! That helps a lot!
You're welcome.

lgrov44, an Australian Scratcher whose most famous for his follows, followed by his activity, especially on Discussion Forums, and his follower count. Is also a remix chainer and school student. Identifies as bisexual.

My top 3 favourite people:
1. @Higgies (deleted) - First Follower, Thank you so much! (Wish you could see this…)
2. @Dubstepv1 (Banned/Moved) - Remix Chainer
3. @GIitchInTheMatrix (Moved to @GlitchedThrough) - Many small things.
Still looking for one of my first followers who are still active.
deck26
Scratcher
1000+ posts

Is there a current day of month block?

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
Scratcher
1000+ posts

Is there a current day of month block?

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)

Last edited by medians (March 31, 2024 15:01:35)


:D: 2.0 is 11 years old https://scratch.mit.edu/projects/1018259409/
Medians bamboozled by 3.0 (version 3.0): https://scratch.mit.edu/projects/979822351/
hi875230163394: You're similar to valve in that you both hate a certain number…
Scratch 0.x, 1.x, 2.x, 3.x and LogoBlocks Archives
Bamboozlement: https://scratch.mit.edu/studios/33739789
Years on internet: 15 (soon 16)
medians: Oh god not this utc - 12 thing again..
Fun_Cupcake_i81: What, were you expecting not to see the utc - 12 thing again? THE UTC - 12 THIGN ALWAYS RETURNS. ALWAYS.
medians: I knew it would happen. I was the one who started it last year.
Fun_Cupcake_i81: Well then if you didn't want it back maybe you need to time travel to last year and fix that

Oh wait if you could time travel I think we all know exactly when you would go-
user1: That picture is from 2.0. Now he’s at my house and is my pet.
user2: But this is medians we're talking about, so “from 2.0” can mean the same thing as “from five seconds ago”.

Detect Scratch version here
My other accounts: @selfexplanatory @modesties @chaircard @fireflyhero @dividendyield @colloids @radians @skeuamorphism @dihectogon @anglebisector @aau- @EditBlockColors @AdamantOrb @MoongeistBeam @festively @Ampharos_ @straightforwardness
i trolled redcat LOL





if you see this
{what method did you use::control hat
answer on profile ::motion
} ::operators
;
Malicondi
Scratcher
1000+ posts

Is there a current day of month block?

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

Last edited by Malicondi (March 31, 2024 15:03:14)


post #1000 post #100 i help in the forums post #1 post #500 0 second ninja
I recommend reading jvvg's essay about the scratch team before complaining, as it may change your opinion and provide insight on the topic.

coming soon :)


bombardingppl
Scratcher
100+ posts

Is there a current day of month block?

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]>>

I like scratching. I like math, I like coding, yknow.
You'll find me on the forum, as well as creating projects actively.

try some of my projects, they include simulations, games, math/geometry, all the gud stuff.
BrightCloud33
Scratcher
6 posts

Is there a current day of month block?

@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 ^^

Powered by DjangoBB