@Override public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) { String str = castToString(pageContext.getTimeZone()); DumpTable table = new DumpTable("date", "#ff6600", "#ffcc99", "#000000"); if (dp.getMetainfo()) table.appendRow( 1, new SimpleDumpData("Date Time (" + pageContext.getTimeZone().getID() + ")")); else table.appendRow(1, new SimpleDumpData("Date Time")); table.appendRow(0, new SimpleDumpData(str)); return table; }
@Override public Object invoke(PageContext pc, Object[] args) throws PageException { if (args.length == 1) return call(pc, Caster.toDatetime(args[0], pc.getTimeZone())); return call(pc, Caster.toDatetime(args[0], pc.getTimeZone()), Caster.toString(args[1])); }
public static double call(PageContext pc, DateTime date, String strTimezone) throws ExpressionException { return _call( pc, date, strTimezone == null ? pc.getTimeZone() : TimeZoneUtil.toTimeZone(strTimezone)); }
public static double call(PageContext pc, DateTime date) { return _call(pc, date, pc.getTimeZone()); }