Examples of JSPDate


Examples of org.apache.taglibs.standard.lang.jpath.adapter.JSPDate

     *         evaluation
     */
    public Object evaluate(PageContext pageContext, IterationContext icontext)
            throws EvaluationException {

        JSPDate result;

        try {
            result = Convert.toJSPDate(jjtGetChild(0).evaluate(pageContext,
                    icontext));

            String arg2 =
                Convert.toString(jjtGetChild(1).evaluate(pageContext,
                    icontext));
            int arg3 = Convert.toDouble(jjtGetChild(2).evaluate(pageContext,
                           icontext)).intValue();
            int field = getCalendarConstant(arg2);

            result.roll(field, arg3);
        } catch (ConversionException ce) {
            throw new EvaluationException(this, ce.getMessage());
        }

        return result;
View Full Code Here

Examples of org.apache.taglibs.standard.lang.jpath.adapter.JSPDate

     *         evaluation
     */
    public Object evaluate(PageContext pageContext, IterationContext icontext)
            throws EvaluationException {

        JSPDate result;

        try {
            result = Convert.toJSPDate(jjtGetChild(0).evaluate(pageContext,
                    icontext));

            String arg2 =
                Convert.toString(jjtGetChild(1).evaluate(pageContext,
                    icontext));
            int arg3 = Convert.toDouble(jjtGetChild(2).evaluate(pageContext,
                           icontext)).intValue();
            int field = getCalendarConstant(arg2);

            result.add(field, arg3);
        } catch (ConversionException ce) {
            throw new EvaluationException(this, ce.getMessage());
        }

        return result;
View Full Code Here

Examples of org.apache.taglibs.standard.lang.jpath.adapter.JSPDate

            throws EvaluationException {

        String formatted;

        try {
            JSPDate arg =
                Convert.toJSPDate(jjtGetChild(0).evaluate(pageContext,
                    icontext));
            String pattern =
                Convert.toString(jjtGetChild(1).evaluate(pageContext,
                    icontext));
            DateFormat form;

            if (jjtGetNumChildren() > 2) {
                String arg3 =
                    Convert.toString(jjtGetChild(2).evaluate(pageContext,
                        icontext));
                Locale locale = getLocale(arg3);

                form = DateFormat.getDateInstance(DateFormat.MEDIUM, locale);
            } else {
                form = DateFormat.getInstance();
            }

            try {
                ((SimpleDateFormat) form).applyPattern(pattern);

                formatted = form.format(new Date(arg.getTime().longValue()));
            } catch (IllegalArgumentException iae) {
                formatted = new String("");
            }
        } catch (ConversionException ce) {
            throw new EvaluationException(this, ce.getMessage());
View Full Code Here

Examples of org.apache.taglibs.standard.lang.jpath.adapter.JSPDate

     *         evaluation
     */
    public Object evaluate(PageContext pageContext, IterationContext icontext)
            throws EvaluationException {

        JSPDate d;

        try {
            if (jjtGetNumChildren() == 3) {
                int year =
                    Convert.toDouble(jjtGetChild(0).evaluate(pageContext,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.