---
title: "If-Else Example 5"
canonical: "https://support.appfire.com/space/PSCONF/15305864/If-Else%20Example%205"
format: markdown
---
> Macro (aura-html)

> Macro (excerpt)
> 
> ```
> 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.");
> }
> ```