Twine version 2.1.3 / Sugarcube 2.18.0
I've read the calendar/clock posts three dozen times. I'm confused where I'm messing up. StoryCaption displays properly.
My set up is this:
<<set $now to new Date()>>
<<set $now to new Date("2017-06-26T06:00")>>
Date & Time: <span style="color:coral">$now</span>
In Passage in question:
<<if $work eq true>><<if $gameDate.getUTCHours() gte 16 and $gameDate.getUTCHours() lte 18>>Go to work
<<else>>Work is closed<</if>><</if>>
Error displayed upon testing:
Error: <<if>>: bad conditional expression in <<if>> clause: Cannot read property 'getUTCHours' of undefined
I have <<set $work to true>> set in the previous passage to the one with the issue and have verified variable is set.
I'd like to make it to where the individual can go to school but only during certain times.
Any assistance would be appreciated.