Skip to content

Instantly share code, notes, and snippets.

@mariomartinezricston
Created July 8, 2016 11:43
Show Gist options
  • Save mariomartinezricston/be3beda018aa1d9a907013dfd4dec217 to your computer and use it in GitHub Desktop.
Save mariomartinezricston/be3beda018aa1d9a907013dfd4dec217 to your computer and use it in GitHub Desktop.
<configuration doc:name="Configuration">
<expression-language>
<global-functions>
def dayOfTheMonth(date){
import java.util.Calendar;
import java.text.SimpleDateFormat;
cal = Calendar.getInstance();
sdf = new SimpleDateFormat('yyyyMMdd');
cal.setTime(sdf.parse(date));
return cal.getActualMaximum(Calendar.DAY_OF_MONTH).toString();
}
</global-functions>
</expression-language>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment