Ranges from 1 through 31, inclusive. The term date can be confusing but the day of the month is meant.
The function uses a big function to get the current number of the month.
DateFromTime = function(t){
var m = MonthFromTime(t);
var d = DayWithinYear(t);
var ily = InLeapYear(t);
switch (m) {
case 0: return d+1;
case 1: return d - 30;
case 2: return d - 58 - ily;
case 3: return d - 89 - ily;
case 4: return d - 119 - ily;
case 5: return d - 150 - ily;
case 6: return d - 180 - ily;
case 7: return d - 211 - ily;
case 8: return d - 242 - ily;
case 9: return d - 272 - ily;
case 10: return d - 303 - ily;
case 11: return d - 333 - ily;
}
return NaN;
}