Is there a quick way to get date information- per se, Number of days in a particular month- in a particular year. I would like to make a customized calendar with buttons that light up and provides various functionailties.
the are no build-in functions for these values but you can use small subs like:
B4X:
Sub NumberOfDaysInMonth(month, year)
if month < 10 then
month = "0" & month
end if
return DateDay(DateAdd(DateParse(month & "/01/" & year), 0, +1, -1))
End Sub
Sub NumberOfDaysInYear(year)
return DateDayOfYear(DateAdd(DateParse("01/01/" & year), +1, 0, -1))
End Sub