The Unix ‘cal’ command can also come in handy for certain ‘date’ scripting tasks.
OS version: OS X
set mmCount to word -1 of (do shell script "cal"
-->"30"
set febCount to word -1 of (do shell script "cal 2 2003") as number
--> 28
--If your looping thru every day of the month (to build urls for an example)
set dayList to words 10 thru -1 of (do shell script "cal")
-->{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30"}