Hi @adrquint! Thanks for posting.
There does seem to be a nice extension to moment
that would do the trick here but it doesn't seem to be compatible with our "Libraries" feature, for whatever reason. For reference, you can load in external libraries via the "App Settings -> Libraries" menu. This bypasses the need to write require
or import
statements.
You might notice that I added a library called date-holidays
, though, which we can use in conjunction with moment
to solve your problem.
The above query I wrote is spitting out 22, which aligns with what we would expect to see for August! We can then connect the data source for some component on our page to the output of this query.
Definitely let us know if you have any questions about the logic or syntax here - everybody has varying levels of experience writing JS scripts.