getDay( ) example
The following is an onOpen event handler for a form that makes the "Game center" button visible on the weekends:
function Form_onOpen()
if new Date().getDay() % 6 == 0 // If today is a weekend day
this.gameCenterButton.visible = true // Enable access to game center page
endif
The day number modulo 6 is zero for both day numbers 0 and 6, the days on the weekend.