Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
method run(var eventInfo Event)
var
dt Date
siMM,
siYY,
siDD SmallInt
endVar
; Get First Day of this month
dt = today()
siMM = dt.month()
siYY = dt.year()
dt = Date( string( siMM ) + "/01/" +
string( siYY ) )
; Go to last day of last month and then calc days
dt = dt - 1
siMonthDays = dt.DaysInMonth()
; Show Results
msgInfo( "FYI", "Last month ended on " + String( dt ) +
" and had " + String( siMonthDays ) + " days." )
endMethod
method run(var eventInfo Event)
var
dt Date
siMM,
siYY,
siDD SmallInt
endVar
; Get First Day of this month
dt = today()
siMM = dt.month()
siYY = dt.year()
siDD = dt.day()
dt = Date( string( siMM ) + "/01/" +
string( siYY ) )
; Calculate the same day in the previous month
; by returning the last day of the previous month
; and then using that to determine the month and
; year needed for the final date.
dt = dt - 1
siMM = dt.month()
siYY = dt.year()
dt = Date( string( siMM ) + "/" +
string( siDD ) + "/" +
string( siYY ) )
siMonthDays = dt.DaysInMonth()
; Show Results
msgInfo( "FYI", "Last month was " + String( dt ) +
" and had " + String( siMonthDays ) + " days." )
endMethod