Returns the maximum value of the required field which the passed calendar as argument can have.
 

1 calendar.getActualMaximum

<calendar.getActualMaximum field='field'>
    <calendar /> +
</calendar.getActualMaximum>
Example

Returns the last day of the month based on today's day.

Copy
<xsql-script name='calendar'>
    <body>
        <println><calendar.getActualMaximum field='DAY_OF_MONTH'>
            <calendar>
                <date.current/>
            </calendar>
        </calendar.getActualMaximum></println>
    </body>
</xsql-script>

The result is:

Copy
30
Example

Returns the last month of the year based on today's day.

Copy
<xsql-script name='calendar'>
   <body>
       <println><calendar.getActualMaximum field='MONTH'>
           <calendar>
               <date.current/>
           </calendar>
       </calendar.getActualMaximum></println>
   </body>
</xsql-script>

The result is:

Copy
11