Does this month start on a Monday?
Excel, 44 34 23 19 18 bytes
=2=MOD(A3&"-"&A2,7
-11 thanks to Adam and -4 thanks to Shazback
-1 thanks to this
Original Answer
=(TEXT(DATE(A2,A3,1),"ddd")="Mon")
Ensure that the year is placed in cell A2
and the month in A3
.
:( Crossed out 44 is still 44.
Ruby, 26 24 bytes
->d{Time.gm(*d).monday?}
Try it online!
You'll never guess what this does.
Edit: -2 bytes from Dingus.
Bash + GNU utilities, 25 22 19 bytes
date -d$1-1|grep ^M
Try it online!
Or verify the test cases online.
The input is passed as an argument in the format year-month
, and the output is the exit code (0 for truthy, 1 for falsey, as usual).