# How many *day's in a month

by P. Andreas Schmidt, IVE

Version 2 (December 19, 2021)

This flow is an example for the formula to calculate how many times a particular weekday occurs in any given month. I fitted the calculation into one block, which makes it not look so nice or understandable, but it's basically a question of
1) getting number of days of that month
2) substracting a number depending on what is the first day of that month and what day are we counting
3) dividing this by 7 and adding 1
The result can only be 4 or 5.
You might be saying "smarty pants, when you ask me to pick a date I can see in one glimpse how many times any day that month occurs!". Well obviously this is just a showcase. You might need to calculate for some other case or scenario in your flow and find the one block handy that does the calculation for you (changing or adapting the variables, reducing the arrays if you only need one/some, etc). So feel free to make use of this if it is of any use to you.