DateTime object outputs 01, 02, 03 etc when I use
$num = $dt->format('d');
to get the day number
Then I compare the $num value if it's the first day of the month like so:
if ($num == 1)
but the $num value is '01'.
Now php compares it as expected
var_dump($num == 1)
returns true
I was thinking, should this be enough for me or I should enclose the $num variable with an intval like so:
intval($num)
this way if it is 01 it will display '1'