[ create a new paste ] login | about

Link: http://codepad.org/QJvxuuMQ    [ raw code | output | fork ]

PHP, pasted on Nov 28:
1
2
3
4
5
6
<?php
function primeiroDiaDoMes($mes) {
    $dia =  (int) date("w", strtotime($mes . "/01/" . date('Y')));
    return $dia;
}
echo primeiroDiaDoMes("11");


Output:
1
6


Create a new paste based on this one


Comments: