Examples of Year


Examples of org.apache.axis2.databinding.types.Year

                throw new AxisFault(getFaultString(value, "MonthDay"));
            }
        }
        if (Constants.XSD_YEAR.equals(type)) {
            try {
                Year year = ConverterUtil.convertToGYear(value);
                Calendar calendar = Calendar.getInstance();
                calendar.clear();
                calendar.set(Calendar.YEAR, year.getYear());
                String timezone = year.getTimezone();
                if (timezone != null) {
                    calendar.setTimeZone(TimeZone.getTimeZone(timezone));
                }
                return engine.getCx().newObject(engine, "Date", new Object[]{calendar.getTimeInMillis()});
            } catch (Exception e) {
View Full Code Here

Examples of org.apache.axis2.databinding.types.Year

    public static String convertToGYear(Object jsObject) throws AxisFault {
        try {
            // If the user returned a valid GYear a s a String we use the converterUtil to
            // validate it and return it back.
            if (jsObject instanceof String) {
                Year year = ConverterUtil.convertToGYear((String)jsObject);
                return ConverterUtil.convertToString(year);
            }
            Date date = (Date) Context.jsToJava(jsObject, Date.class);
            Calendar calendar = Calendar.getInstance();
            calendar.clear();
            calendar.setTime(date);
            Year year = new Year(calendar.get(Calendar.YEAR));
            return ConverterUtil.convertToString(year);
        } catch (EvaluatorException e) {
            throw new AxisFault("Unable to convert the return value to year");
        } catch (NumberFormatException e) {
            throw new AxisFault("Unable to convert the return value to day");
View Full Code Here

Examples of org.apache.axis2.databinding.types.Year

    public static Year convertToGYear(String s) {
        if ((s == null) || s.equals("")){
            return null;
        }
        return new Year(s);
    }
View Full Code Here

Examples of org.apache.axis2.databinding.types.Year

    public static Year convertToGYear(String s) {
        if ((s == null) || s.equals("")){
            return null;
        }
        return new Year(s);
    }
View Full Code Here

Examples of org.apache.axis2.databinding.types.Year

    public static MonthDay convertTogMonthDay(String s) {
        return new MonthDay(s);
    }

    public static Year convertTogYear(String s) {
        return new Year(s);
    }
View Full Code Here

Examples of org.apache.axis2.databinding.types.Year

    public static Year convertToGYear(String s) {
        if ((s == null) || s.equals("")){
            return null;
        }
        return new Year(s);
    }
View Full Code Here

Examples of org.boris.expr.function.excel.YEAR

    private void testDates(double date, int day, int month, int year, int hour,
            int minute, int second, int weekday) throws ExprException {
        assertEquals("testing " + date, eval(new DAY(), date), (double) day);
        assertEquals("testing " + date, eval(new MONTH(), date), (double) month);
        assertEquals("testing " + date, eval(new YEAR(), date), (double) year);
        assertEquals("testing " + date, eval(new HOUR(), date), (double) hour);
        assertEquals("testing " + date, eval(new MINUTE(), date),
                (double) minute);
        assertEquals("testing " + date, eval(new SECOND(), date),
                (double) second);
View Full Code Here

Examples of org.jboss.as.ejb3.timerservice.schedule.attribute.Year

        this.minute = new Minute(schedule.getMinute());
        this.hour = new Hour(schedule.getHour());
        this.dayOfWeek = new DayOfWeek(schedule.getDayOfWeek());
        this.dayOfMonth = new DayOfMonth(schedule.getDayOfMonth());
        this.month = new Month(schedule.getMonth());
        this.year = new Year(schedule.getYear());
        if (schedule.getTimezone() != null && schedule.getTimezone().trim().isEmpty() == false) {
            // If the timezone ID wasn't valid, then Timezone.getTimeZone returns
            // GMT, which may not always be desirable.
            // So we first check to see if the timezone id specified is available in
            // timezone ids in the system. If it's available then we log a WARN message
View Full Code Here

Examples of org.jboss.as.ejb3.timerservice.schedule.attribute.Year

        this.minute = new Minute(schedule.getMinute());
        this.hour = new Hour(schedule.getHour());
        this.dayOfWeek = new DayOfWeek(schedule.getDayOfWeek());
        this.dayOfMonth = new DayOfMonth(schedule.getDayOfMonth());
        this.month = new Month(schedule.getMonth());
        this.year = new Year(schedule.getYear());
        if (schedule.getTimezone() != null && schedule.getTimezone().trim().isEmpty() == false) {
            // If the timezone ID wasn't valid, then Timezone.getTimeZone returns
            // GMT, which may not always be desirable.
            // So we first check to see if the timezone id specified is available in
            // timezone ids in the system. If it's available then we log a WARN message
View Full Code Here

Examples of org.jboss.ejb3.timer.schedule.attribute.Year

      this.minute = new Minute(schedule.getMinute());
      this.hour = new Hour(schedule.getHour());
      this.dayOfWeek = new DayOfWeek(schedule.getDayOfWeek());
      this.dayOfMonth = new DayOfMonth(schedule.getDayOfMonth());
      this.month = new Month(schedule.getMonth());
      this.year = new Year(schedule.getYear());
      if (schedule.getTimezone() != null && schedule.getTimezone().trim().isEmpty() == false)
      {
         // If the timezone ID wasn't valid, then Timezone.getTimeZone returns
         // GMT, which may not always be desirable.
         // So we first check to see if the timezone id specified is available in
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.