-
Notifications
You must be signed in to change notification settings - Fork 15
Date Object
GodDragoner edited this page May 17, 2018
·
2 revisions
date::before(TeaseDate date) Returns whether this date is set to a date before the date given
date::after(TeaseDate date) Returns whether this date is set to a time after the date given
date::sameDay(TeaseDate date) Returns whether both dates are set to the same day (no matter the hours, minutes etc.)
date::hasPassed() Returns whether this date has already passed
if (!getDate(VARIABLE_NEXT_PUNISHMENT_DAY).sameDay(setDate())) {
sendMessage("You've been skipping punishment day %SlaveName%!");
}
//Set the date to the next thursday (today is thursday)
setDate(VARIABLE_NEXT_PUNISHMENT_DAY).addDay(7).setHour(0).setMinute(0).setSecond(0));