Examples of SimpleDate


Examples of common.datetime.SimpleDate

      }

      MonetaryAmount amount;
      String creditCardNumber;
      String merchantNumber;
      SimpleDate date;
      try {
        amount = MonetaryAmount.valueOf(fields.readString(0));
        creditCardNumber = fields.readString(1);
        merchantNumber = fields.readString(2);
        String[] dates = StringUtils.delimitedListToStringArray(fields.readString(3), "/");
        date = new SimpleDate(new Integer(dates[0]), new Integer(dates[1]), new Integer(dates[2]));
      } catch (Exception e) {
        throw new InvalidBatchException("Cannot parse dining from fields: [" + fields + "]", e);
      }

      Dining dining = new Dining(amount, creditCardNumber, merchantNumber, date);
View Full Code Here

Examples of common.datetime.SimpleDate

   * @param year the year of the dining event
   * @return the dining event
   */
  public static Dining createDining(String amount, String creditCardNumber, String merchantNumber, int month,
      int day, int year) {
    return new Dining(MonetaryAmount.valueOf(amount), creditCardNumber, merchantNumber, new SimpleDate(month, day,
        year));
  }
View Full Code Here

Examples of common.datetime.SimpleDate

   * @param year the year of the dining event
   * @return the dining event
   */
  public static Dining createDining(String amount, String creditCardNumber, String merchantNumber, int month,
      int day, int year) {
    return new Dining(MonetaryAmount.valueOf(amount), creditCardNumber, merchantNumber, new SimpleDate(month, day,
        year));
  }
View Full Code Here

Examples of common.datetime.SimpleDate

   * @param year the year of the dining event
   * @return the dining event
   */
  public static Dining createDining(String amount, String creditCardNumber, String merchantNumber, int month,
      int day, int year) {
    return new Dining(MonetaryAmount.valueOf(amount), creditCardNumber, merchantNumber, new SimpleDate(month, day,
        year));
  }
View Full Code Here

Examples of common.datetime.SimpleDate

   * @param year the year of the dining event
   * @return the dining event
   */
  public static Dining createDining(String amount, String creditCardNumber, String merchantNumber, int month,
      int day, int year) {
    return new Dining(MonetaryAmount.valueOf(amount), creditCardNumber, merchantNumber, new SimpleDate(month, day,
        year));
  }
View Full Code Here

Examples of common.datetime.SimpleDate

      }

      MonetaryAmount amount;
      String creditCardNumber;
      String merchantNumber;
      SimpleDate date;
      try {
        amount = MonetaryAmount.valueOf(fields.readString(0));
        creditCardNumber = fields.readString(1);
        merchantNumber = fields.readString(2);
        String[] dates = StringUtils.delimitedListToStringArray(fields.readString(3), "/");
        date = new SimpleDate(new Integer(dates[0]), new Integer(dates[1]), new Integer(dates[2]));
      } catch (Exception e) {
        throw new InvalidBatchException("Cannot parse dining from fields: [" + fields + "]", e);
      }

      Dining dining = new Dining(amount, creditCardNumber, merchantNumber, date);
View Full Code Here

Examples of freemarker.template.SimpleDate

        }
       
        else if (testName.equals("dateformat")) {
            GregorianCalendar cal = new GregorianCalendar(2002, 10, 15, 14, 54, 13);
            cal.setTimeZone(TimeZone.getTimeZone("GMT"));
            dataModel.put("date", new SimpleDate(cal.getTime(), TemplateDateModel.DATETIME));
            dataModel.put("unknownDate", new SimpleDate(cal.getTime(), TemplateDateModel.UNKNOWN));
        }
   
        else if (testName.equals("number-format")) {
            dataModel.put("int", new SimpleNumber(new Integer(1)));
            dataModel.put("double", new SimpleNumber(new Double(1.0)));
View Full Code Here

Examples of freemarker.template.SimpleDate

            this.dateType = dateType;
        }
       
        TemplateModel calculateResult(Number num, TemplateModel model)
        throws TemplateModelException {
            return new SimpleDate(new Date(safeToLong(num)), dateType);
        }
View Full Code Here

Examples of freemarker.template.SimpleDate

    public void setupContext() {
      getContext().put("version", Version.getDefault());
        getContext().put("ctx", getContext() ); //TODO: I would like to remove this, but don't know another way to actually get the list possible "root" keys for debugging.
        getContext().put("templates", new Templates());
       
        getContext().put("date", new SimpleDate(new Date(), TemplateDateModel.DATETIME));       
       
    }
View Full Code Here

Examples of freemarker.template.SimpleDate

        }
       
        else if (testName.equals("dateformat")) {
            GregorianCalendar cal = new GregorianCalendar(2002, 10, 15, 14, 54, 13);
            cal.setTimeZone(TimeZone.getTimeZone("GMT"));
            dataModel.put("date", new SimpleDate(cal.getTime(), TemplateDateModel.DATETIME));
            dataModel.put("unknownDate", new SimpleDate(cal.getTime(), TemplateDateModel.UNKNOWN));
        }
   
        else if (testName.equals("number-format")) {
            dataModel.put("int", new SimpleNumber(new Integer(1)));
            dataModel.put("double", new SimpleNumber(new Double(1.0)));
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.