Add or subtract the specified amount of time to the calendar, based on the calendar's rules.

1 calendar.add

<calendar.add
    field='field'
    value='value'
>
    <calendar /> !
</calendar.add>
Example

Modify the calendar day. First a calendar is defined and it is obtained by screen today. Then one day is added to the same calendar and printed on the screen to see the result.

Copy
<xsql-script name='calendar_add'>
    <body>
        <set name='cal'>
	    <calendar />
	</set>
        
        <set name='mday'>
	     <calendar.get field= "DAY_OF_MONTH"><cal/></calendar.get>
	</set>
		
        <println>Today : <mday/></println>
        
        <set name='tomorrow'>
            <calendar.get field= "DAY_OF_MONTH"><calendar.add field='DAY_OF_WEEK' value='1'><cal/></calendar.add></calendar.get>
        </set>
                
	<println>Tomorrow : <tomorrow/></println>
    </body>
</xsql-script>

The result is:

Copy
Today : 22
Tomorrow : 23