Created
September 14, 2010 12:32
-
-
Save bjartek/578966 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for{ | |
event <- events | |
diff <- event.notifyList | |
val now = new DateTime().plusDays(diff) | |
if (now.getMonthOfYear == event.month && now.getDayOfMonth == event.date) | |
} { | |
hits = hits + 1 | |
Mailer.mail("Reminder: " + event.name + " (" + event.textualDate + ")", | |
"The event '" + event.name + "' occurs " + event.textualDate + ".\n" + | |
"You'll be reminded " + event.notifyDates + " days before that.") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment