I am VERY new to Freemarker. Apparently, it is the template model of choice in NetSuite. I am tasked with updating an email template to display a line of text that includes the last business day of the month.
I see how to display the field in documentation that I have found and here is my code for that.
<#assign aDateTime = .now>
<#assign aDate = aDateTime?date>
<span>PLEASE EXPEDITE ORDER PROCESSING AND SHIP OVERNIGHT TO GUARANTEE DELIVERY BY EOD
THE LAST BUSINESS DAY OF THE MONTH ${aDate}</span>
My question, since I clueless here, is how to display the last business day of the month?
EDITED TO ADD: I have found that the add ins for Freemarker date manipulation can be of some assistance here (based on another thread here). The issue is getting the right logic down to show the date. Here is an example of subtracting 18 days from a certain date:
${(mydate?long - 18 * 86400000)?number_to_date?string("yyyy-MM-dd")}
So I know there is a way to do what I am trying to do with this, but I just can't wrap my head around it.
Any and all assistance would be greatly appreciated.
Thanks.