[Hippo-cms7-user BETA] [HST2] Date fields

Niels van Kampenhout n.vankampenhout at onehippo.com
Tue Oct 21 00:06:39 CEST 2008


I have a document type with a date field. How can I best use it in a 
JSP? If I just print:

${contentNode.property['myproject:date']}

I get:

java.util.GregorianCalendar[time=1224539880000,areFieldsSet=true,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id="America/Los_Angeles",offset=-28800000,dstSavings=3600000,useDaylight=true,transitions=185,lastRule=java.util.SimpleTimeZone[id=America/Los_Angeles,offset=-28800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2008,MONTH=9,WEEK_OF_YEAR=43,WEEK_OF_MONTH=4,DAY_OF_MONTH=20,DAY_OF_YEAR=294,DAY_OF_WEEK=2,DAY_OF_WEEK_IN_MONTH=3,AM_PM=1,HOUR=2,HOUR_OF_DAY=14,MINUTE=58,SECOND=0,MILLISECOND=0,ZONE_OFFSET=-28800000,DST_OFFSET=3600000]

Do I actually have to use the GregorianCalendar API or is there a 
convenience module in HST for this? Either way, can I get a code example?

Thanks
Niels



More information about the Hippo-cms7-user mailing list