It looks like you're new here. If you want to get involved, click one of these buttons!
var weekdays = new Array(); weekdays[0] = "Sunday"; weekdays[1] = "Monday"; weekdays[2] = "Tuesday"; weekdays[3] = "Wednesday"; weekdays[4] = "Thursday"; weekdays[5] = "Friday"; weekdays[6] = "Saturday"; var date = new Date(2017,2,1,17,30,0); Macro.add( { "todayis", function() { return weekdays[time.getUTCDay()]; } });
/% Kiosk Passage: %/ <<linkreplace "Find out the current date by looking at the date of a daily newspaper>> <<if <<todayis>> is "Wednesday">> Oh my, how is this possible? It's Wednesday. But I thought today is Friday? Does that mean my machine worked? I traveled through time? <</if>> <</linkreplace>>
Comments
Try the following: The today() function is assigned to the window object so that it will be globally available.
And the passage: