title: Calculate last day of quarter with date binary in a simpler/better way
body: <p>Is there a simpler/better way to calculate the last day of the quarter with date, than the one I've come up with?</p>
  <pre><code>#QUARTER=$(( ((($(date +'%-m') - 1) / 3) + 1) ))
  #LAST_MONTH_QUARTER=$(( 3 * ${QUARTER} ))
  
  LAST_DAY_QUARTER=$(date +&quot;%Y%m%d&quot; -d&quot;$(date +%Y)-$(( 3 * ((($(date +'%-m') - 1) / 3) + 1) ))-01 + 1 month - 1 day&quot;)
  [[ &quot;$(date +&quot;%Y%m%d&quot;)&quot; == &quot;${LAST_DAY_QUARTER}&quot; ]] &amp;&amp; echo OK || echo NOK
  </code></pre>
  <p>Thank you in advance for your help</p>