I'm trying to wrap my head around the math involved, but I'm sure you're right on the implementation. So the question that beckons is whether we want floating point values in the year() method or if we wanna use integers and add an optional month with the month() method?
It could be added that a year() method that takes floating point values (like 2000.25) can also be made to accept integer values (like 2000), so the fraction representing the month would still be optional.
Perhaps we could have years() also accept string representations of year/month, like year("2000:3") for the month of March of the year AD 2000. The application would simply parse the values inside the string and convert them into integer values for the actual processing. The advantage being that we would be able to have intervals that include months, like:
Which would trigger on any game turn between December of AD 1939 and January of AD 1940.
edit: Or we could just allow for all variants. More programming for me to figure out, goodie!
It could be added that a year() method that takes floating point values (like 2000.25) can also be made to accept integer values (like 2000), so the fraction representing the month would still be optional.
Perhaps we could have years() also accept string representations of year/month, like year("2000:3") for the month of March of the year AD 2000. The application would simply parse the values inside the string and convert them into integer values for the actual processing. The advantage being that we would be able to have intervals that include months, like:
PHP:
Trigger().year("1939:12","1940:1")...
edit: Or we could just allow for all variants. More programming for me to figure out, goodie!
