1 calendar

<calendar>
    <calendar /> +
</calendar>
Example
Copy
<xsql-script name='calendar'>
    <body>
        <set name='cal'>
            <calendar />
        </set>
        <println>a java.util.Calendar    : <cal/></println>
        <println>getTime  (returns  date): <calendar.getTime><cal/></calendar.getTime></println>
        <println>get DAY_OF_WEEK         : <calendar.get field='DAY_OF_WEEK'><cal/></calendar.get></println>
        <println>get DAY_OF_MONTH        : <calendar.get field='DAY_OF_MONTH'><cal/></calendar.get></println>
        <println>get DAY_OF_WEEK_IN_MONTH: <calendar.get field='DAY_OF_WEEK_IN_MONTH'><cal/></calendar.get></println>
        <println>get WEEK_OF_MONTH       : <calendar.get field='WEEK_OF_MONTH'><cal/></calendar.get></println>
        <println>get WEEK_OF_YEAR        : <calendar.get field='WEEK_OF_YEAR'><cal/></calendar.get></println>
        <println>get MONTH               : <calendar.get field='MONTH'><cal/></calendar.get></println>
        <println>get YEAR                : <calendar.get field='YEAR'><cal/></calendar.get></println>
        <println>get HOUR                : <calendar.get field='HOUR'><cal/></calendar.get></println>
        <println>get MINUTE              : <calendar.get field='MINUTE'><cal/></calendar.get></println>
        <println>get SECOND              : <calendar.get field='SECOND'><cal/></calendar.get></println>
        <println>getActualMaximum        : <calendar.getActualMaximum field='DATE'><cal/></calendar.getActualMaximum></println>
        <println>getActualMinimum        : <calendar.getActualMinimum field='DATE'><cal/></calendar.getActualMinimum></println>
        <println>getFirstDayOfWeek       : <calendar.getFirstDayOfWeek><cal/></calendar.getFirstDayOfWeek></println>

        <println>add DAY_OF_WEEK         : <calendar.add field='DAY_OF_WEEK' value='1'><cal/></calendar.add></println>
    </body>
</xsql-script>

Shows on the screen:

Copy
a java.util.Calendar    : java.util.GregorianCalendar[time=1474534630147,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/Madrid",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=165,lastRule=java.util.SimpleTimeZone[id=Europe/Madrid,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2016,MONTH=8,WEEK_OF_YEAR=38,WEEK_OF_MONTH=4,DAY_OF_MONTH=22,DAY_OF_YEAR=266,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=4,AM_PM=0,HOUR=10,HOUR_OF_DAY=10,MINUTE=57,SECOND=10,MILLISECOND=147,ZONE_OFFSET=3600000,DST_OFFSET=3600000]
getTime  (returns  date): 22-09-2016
get DAY_OF_WEEK         : 5
get DAY_OF_MONTH        : 22
get DAY_OF_WEEK_IN_MONTH: 4
get WEEK_OF_MONTH       : 4
get WEEK_OF_YEAR        : 38
get MONTH               : 8
get YEAR                : 8
get HOUR                : 10
get MINUTE              : 57
get SECOND              : 10
getActualMaximum        : 30
getActualMinimum        : 1
getFirstDayOfWeek       : 2
add DAY_OF_WEEK         : java.util.GregorianCalendar[time=1474621030147,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/Madrid",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=165,lastRule=java.util.SimpleTimeZone[id=Europe/Madrid,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2016,MONTH=8,WEEK_OF_YEAR=38,WEEK_OF_MONTH=4,DAY_OF_MONTH=23,DAY_OF_YEAR=267,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=4,AM_PM=0,HOUR=10,HOUR_OF_DAY=10,MINUTE=57,SECOND=10,MILLISECOND=147,ZONE_OFFSET=3600000,DST_OFFSET=3600000]