Any one help me how to check the day ocuurence in a month in shell script

Example :

the day is monday means where this monday is first monday or second one