Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
We've encountered an issue exporting this macro. Please try exporting this page again later.
Excerpt
Code Block
number monthNumber = month(currentDate());
string monthName = formatDate(currentDate(), "MMMM");
number [] longMonths = {1,3,5,7,8,10,12};

if(arrayElementExists(longMonths, monthNumber)) {
    runnerLog("Example 5: There are 31 days this month.");
} else if(monthNumber == 2) {
    runnerLog("Example 5: There are 28 or 29 days this month. Who knows...");
} else {
    runnerLog("Example 5: There are 30 days this month.");
}