Examples of DateValue


Examples of fi.luomus.commons.containers.DateValue

      String actual = DateUtils.humanize(new DateValue(1, 1, 0), DateUtils.FI);
      assertEquals("1 kuukausi 1 päivä", actual);
    }

    public void test___humanize_6() {
      String actual = DateUtils.humanize(new DateValue(0, 1, 3), DateUtils.FI);
      assertEquals("3 vuotta 1 kuukausi", actual);
    }
View Full Code Here

Examples of fi.luomus.commons.containers.DateValue

      String actual = DateUtils.humanize(new DateValue(0, 1, 3), DateUtils.FI);
      assertEquals("3 vuotta 1 kuukausi", actual);
    }

    public void test___humanize_to_years_months_days() {
      DateValue yearsMonthsDays = DateUtils.getYearsMonthsDays(1001);
      String actual = DateUtils.humanize(yearsMonthsDays, DateUtils.FI);
      assertEquals("2 vuotta 9 kuukautta 1 päivä", actual);
    }
View Full Code Here

Examples of fi.luomus.commons.containers.DateValue

      String actual = DateUtils.humanize(((long) (1001 * 24 * 60 * 60)) * 1000, DateUtils.FI);
      assertEquals("2 vuotta 9 kuukautta 1 päivä", actual);
    }

    public void test___humanize_en() {
      String actual = DateUtils.humanize(new DateValue(19, 9, 1), DateUtils.EN);
      assertEquals("1 year 9 months 19 days", actual);
    }
View Full Code Here

Examples of net.sf.jsqlparser.expression.DateValue

        _columnOrderdate.setTable(table);
        _columnOrderdate.setColumnName("ORDERDATE");

        MinorThan mt = new MinorThan();
        mt.setLeftExpression(_columnOrderdate);
        mt.setRightExpression(new DateValue(" 1995-01-01 "));
       
        String path = "../test/squall/schemas/tpch.txt";
        double scallingFactor = 1;
        _selEstimator = new SelingerSelectivityEstimator("TEST", new Schema(path, scallingFactor), new TableAliasName(tableList, "SelingerTest"));
    }
View Full Code Here

Examples of net.sf.jsqlparser.expression.DateValue

    @Test
    public void testEstimate_MinorThan() {
        LOG.info("test estimate(MinorThan):");
        MinorThan mt = new MinorThan();
        mt.setLeftExpression(_columnOrderdate);
        mt.setRightExpression(new DateValue("d" + "1995-01-01" + "d"));
        assertEquals("0.45571725571725574", String.valueOf(_selEstimator.estimate(mt)));
    }
View Full Code Here

Examples of net.sf.jsqlparser.expression.DateValue

    @Test
    public void testVisit_DateValue() {
        LOG.info("visit(DateValue):");
        String dateStr = "1995-01-01";
        Date squallDate = new DateConversion().fromString(dateStr);
        Expression exp = new DateValue(" " + dateStr + " ");
        exp.accept(_visitor);
        Date jsqlDate = (Date) _visitor.getResult();
        assertEquals(jsqlDate, squallDate);
    }
View Full Code Here

Examples of net.sf.jsqlparser.expression.DateValue

        LOG.info("visit(DateOp1):");
        Date END_DATE = _dtc.fromString("1998-12-31");
        Date orderDateEnd = new DateSum(new ValueSpecification(_dtc, END_DATE), Calendar.DATE, -151).eval(null);
       
        String dateExp = "1998-08-02";
        Expression exp = new DateValue(" " + dateExp + " ");
        exp.accept(_visitor);
        Date jsqlDate = (Date) _visitor.getResult();
        assertEquals(jsqlDate, orderDateEnd);
    }
View Full Code Here

Examples of net.sf.jsqlparser.expression.DateValue

        LOG.info("visit(DateOp2):");
        Date END_DATE = _dtc.fromString("1998-12-31");
        Date orderDateEnd = new DateSum(new ValueSpecification(_dtc, END_DATE), Calendar.DATE, -30).eval(null);
       
        String dateExp = "1998-12-01";
        Expression exp = new DateValue(" " + dateExp + " ");
        exp.accept(_visitor);
        Date jsqlDate = (Date) _visitor.getResult();
        assertEquals(jsqlDate, orderDateEnd);
    }   
View Full Code Here

Examples of net.sf.jsqlparser.expression.DateValue

        LOG.info("visit(DateOp3):");
        Date END_DATE = _dtc.fromString("1998-12-31");
        Date orderDateEnd = new DateSum(new ValueSpecification(_dtc, END_DATE), Calendar.DATE, -61).eval(null);
       
        String dateExp = "1998-10-31";
        Expression exp = new DateValue(" " + dateExp + " ");
        exp.accept(_visitor);
        Date jsqlDate = (Date) _visitor.getResult();
        assertEquals(jsqlDate, orderDateEnd);
   
View Full Code Here

Examples of net.sf.jsqlparser.expression.DateValue

        LOG.info("visit(DateOp4):");
        Date END_DATE = _dtc.fromString("1998-12-31");
        Date orderDateEnd = new DateSum(new ValueSpecification(_dtc, END_DATE), Calendar.DATE, -121).eval(null);
       
        String dateExp = "1998-09-01";
        Expression exp = new DateValue(" " + dateExp + " ");
        exp.accept(_visitor);
        Date jsqlDate = (Date) _visitor.getResult();
        assertEquals(jsqlDate, orderDateEnd);
    }   
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.