Examples of parseDate()


Examples of fi.luomus.commons.utils.DateParserUtil.parseDate()

    DateParserUtil dateParser = new DateParserUtil(DateParserUtil.LENIENT_MODE_THAT_MAKES_QUESSES);
    Assert.assertEquals(null, dateParser.parseDate(null));
    Assert.assertEquals("", dateParser.parseDate(""));
    Assert.assertEquals("", dateParser.parseDate("   "));
    Assert.assertEquals("2009-06-17", dateParser.parseDate("17.6.2009"));
    Assert.assertEquals("2003", dateParser.parseDate("2003"));
    Assert.assertEquals("2002/2009", dateParser.parseDate("2002,2008, 2009"));
    Assert.assertEquals("2002/2008", dateParser.parseDate("2002,-03,-08"));
    Assert.assertEquals("2013-06-15/2013-06-30", dateParser.parseDate("15-30.6.2013"));  
    Assert.assertEquals("2005-07-28", dateParser.parseDate("28.7.05"));
    Assert.assertEquals(DateUtils.getCurrentYear() + "-07-28", dateParser.parseDate("28.7." +  currentYearInTwoNumberFormat())); // 28.7.14  where 14=current year
View Full Code Here

Examples of fi.luomus.commons.utils.DateParserUtil.parseDate()

    Assert.assertEquals(null, dateParser.parseDate(null));
    Assert.assertEquals("", dateParser.parseDate(""));
    Assert.assertEquals("", dateParser.parseDate("   "));
    Assert.assertEquals("2009-06-17", dateParser.parseDate("17.6.2009"));
    Assert.assertEquals("2003", dateParser.parseDate("2003"));
    Assert.assertEquals("2002/2009", dateParser.parseDate("2002,2008, 2009"));
    Assert.assertEquals("2002/2008", dateParser.parseDate("2002,-03,-08"));
    Assert.assertEquals("2013-06-15/2013-06-30", dateParser.parseDate("15-30.6.2013"));  
    Assert.assertEquals("2005-07-28", dateParser.parseDate("28.7.05"));
    Assert.assertEquals(DateUtils.getCurrentYear() + "-07-28", dateParser.parseDate("28.7." +  currentYearInTwoNumberFormat())); // 28.7.14  where 14=current year
    Assert.assertEquals(DateUtils.getCurrentYear()+1-100 + "-07-28", dateParser.parseDate("28.7." + currentYearInTwoNumberFormatPlus(1))); // 28.7.15   where 15=current year + 1
View Full Code Here

Examples of fi.luomus.commons.utils.DateParserUtil.parseDate()

    Assert.assertEquals("", dateParser.parseDate(""));
    Assert.assertEquals("", dateParser.parseDate("   "));
    Assert.assertEquals("2009-06-17", dateParser.parseDate("17.6.2009"));
    Assert.assertEquals("2003", dateParser.parseDate("2003"));
    Assert.assertEquals("2002/2009", dateParser.parseDate("2002,2008, 2009"));
    Assert.assertEquals("2002/2008", dateParser.parseDate("2002,-03,-08"));
    Assert.assertEquals("2013-06-15/2013-06-30", dateParser.parseDate("15-30.6.2013"));  
    Assert.assertEquals("2005-07-28", dateParser.parseDate("28.7.05"));
    Assert.assertEquals(DateUtils.getCurrentYear() + "-07-28", dateParser.parseDate("28.7." +  currentYearInTwoNumberFormat())); // 28.7.14  where 14=current year
    Assert.assertEquals(DateUtils.getCurrentYear()+1-100 + "-07-28", dateParser.parseDate("28.7." + currentYearInTwoNumberFormatPlus(1))); // 28.7.15   where 15=current year + 1
    Assert.assertEquals("1930-07-28", dateParser.parseDate("28.7.30"));
View Full Code Here

Examples of fi.luomus.commons.utils.DateParserUtil.parseDate()

    Assert.assertEquals("", dateParser.parseDate("   "));
    Assert.assertEquals("2009-06-17", dateParser.parseDate("17.6.2009"));
    Assert.assertEquals("2003", dateParser.parseDate("2003"));
    Assert.assertEquals("2002/2009", dateParser.parseDate("2002,2008, 2009"));
    Assert.assertEquals("2002/2008", dateParser.parseDate("2002,-03,-08"));
    Assert.assertEquals("2013-06-15/2013-06-30", dateParser.parseDate("15-30.6.2013"));  
    Assert.assertEquals("2005-07-28", dateParser.parseDate("28.7.05"));
    Assert.assertEquals(DateUtils.getCurrentYear() + "-07-28", dateParser.parseDate("28.7." +  currentYearInTwoNumberFormat())); // 28.7.14  where 14=current year
    Assert.assertEquals(DateUtils.getCurrentYear()+1-100 + "-07-28", dateParser.parseDate("28.7." + currentYearInTwoNumberFormatPlus(1))); // 28.7.15   where 15=current year + 1
    Assert.assertEquals("1930-07-28", dateParser.parseDate("28.7.30"));
    Assert.assertEquals("1940-07-28", dateParser.parseDate("28.7.40"));
View Full Code Here

Examples of fi.luomus.commons.utils.DateParserUtil.parseDate()

    Assert.assertEquals("2009-06-17", dateParser.parseDate("17.6.2009"));
    Assert.assertEquals("2003", dateParser.parseDate("2003"));
    Assert.assertEquals("2002/2009", dateParser.parseDate("2002,2008, 2009"));
    Assert.assertEquals("2002/2008", dateParser.parseDate("2002,-03,-08"));
    Assert.assertEquals("2013-06-15/2013-06-30", dateParser.parseDate("15-30.6.2013"));  
    Assert.assertEquals("2005-07-28", dateParser.parseDate("28.7.05"));
    Assert.assertEquals(DateUtils.getCurrentYear() + "-07-28", dateParser.parseDate("28.7." +  currentYearInTwoNumberFormat())); // 28.7.14  where 14=current year
    Assert.assertEquals(DateUtils.getCurrentYear()+1-100 + "-07-28", dateParser.parseDate("28.7." + currentYearInTwoNumberFormatPlus(1))); // 28.7.15   where 15=current year + 1
    Assert.assertEquals("1930-07-28", dateParser.parseDate("28.7.30"));
    Assert.assertEquals("1940-07-28", dateParser.parseDate("28.7.40"));
    Assert.assertEquals("1950-07-28", dateParser.parseDate("28.7.50"));
View Full Code Here

Examples of fi.luomus.commons.utils.DateParserUtil.parseDate()

    Assert.assertEquals("2003", dateParser.parseDate("2003"));
    Assert.assertEquals("2002/2009", dateParser.parseDate("2002,2008, 2009"));
    Assert.assertEquals("2002/2008", dateParser.parseDate("2002,-03,-08"));
    Assert.assertEquals("2013-06-15/2013-06-30", dateParser.parseDate("15-30.6.2013"));  
    Assert.assertEquals("2005-07-28", dateParser.parseDate("28.7.05"));
    Assert.assertEquals(DateUtils.getCurrentYear() + "-07-28", dateParser.parseDate("28.7." +  currentYearInTwoNumberFormat())); // 28.7.14  where 14=current year
    Assert.assertEquals(DateUtils.getCurrentYear()+1-100 + "-07-28", dateParser.parseDate("28.7." + currentYearInTwoNumberFormatPlus(1))); // 28.7.15   where 15=current year + 1
    Assert.assertEquals("1930-07-28", dateParser.parseDate("28.7.30"));
    Assert.assertEquals("1940-07-28", dateParser.parseDate("28.7.40"));
    Assert.assertEquals("1950-07-28", dateParser.parseDate("28.7.50"));
    Assert.assertEquals("1905-07-05", dateParser.parseDate("5.7.1905"));
View Full Code Here

Examples of fi.luomus.commons.utils.DateParserUtil.parseDate()

    Assert.assertEquals("2002/2009", dateParser.parseDate("2002,2008, 2009"));
    Assert.assertEquals("2002/2008", dateParser.parseDate("2002,-03,-08"));
    Assert.assertEquals("2013-06-15/2013-06-30", dateParser.parseDate("15-30.6.2013"));  
    Assert.assertEquals("2005-07-28", dateParser.parseDate("28.7.05"));
    Assert.assertEquals(DateUtils.getCurrentYear() + "-07-28", dateParser.parseDate("28.7." +  currentYearInTwoNumberFormat())); // 28.7.14  where 14=current year
    Assert.assertEquals(DateUtils.getCurrentYear()+1-100 + "-07-28", dateParser.parseDate("28.7." + currentYearInTwoNumberFormatPlus(1))); // 28.7.15   where 15=current year + 1
    Assert.assertEquals("1930-07-28", dateParser.parseDate("28.7.30"));
    Assert.assertEquals("1940-07-28", dateParser.parseDate("28.7.40"));
    Assert.assertEquals("1950-07-28", dateParser.parseDate("28.7.50"));
    Assert.assertEquals("1905-07-05", dateParser.parseDate("5.7.1905"));
    Assert.assertEquals("2012-06", dateParser.parseDate("6/2012"));
View Full Code Here

Examples of fi.luomus.commons.utils.DateParserUtil.parseDate()

    Assert.assertEquals("2002/2008", dateParser.parseDate("2002,-03,-08"));
    Assert.assertEquals("2013-06-15/2013-06-30", dateParser.parseDate("15-30.6.2013"));  
    Assert.assertEquals("2005-07-28", dateParser.parseDate("28.7.05"));
    Assert.assertEquals(DateUtils.getCurrentYear() + "-07-28", dateParser.parseDate("28.7." +  currentYearInTwoNumberFormat())); // 28.7.14  where 14=current year
    Assert.assertEquals(DateUtils.getCurrentYear()+1-100 + "-07-28", dateParser.parseDate("28.7." + currentYearInTwoNumberFormatPlus(1))); // 28.7.15   where 15=current year + 1
    Assert.assertEquals("1930-07-28", dateParser.parseDate("28.7.30"));
    Assert.assertEquals("1940-07-28", dateParser.parseDate("28.7.40"));
    Assert.assertEquals("1950-07-28", dateParser.parseDate("28.7.50"));
    Assert.assertEquals("1905-07-05", dateParser.parseDate("5.7.1905"));
    Assert.assertEquals("2012-06", dateParser.parseDate("6/2012"));
    Assert.assertEquals("1930", dateParser.parseDate("30"));
View Full Code Here

Examples of fi.luomus.commons.utils.DateParserUtil.parseDate()

    Assert.assertEquals("2013-06-15/2013-06-30", dateParser.parseDate("15-30.6.2013"));  
    Assert.assertEquals("2005-07-28", dateParser.parseDate("28.7.05"));
    Assert.assertEquals(DateUtils.getCurrentYear() + "-07-28", dateParser.parseDate("28.7." +  currentYearInTwoNumberFormat())); // 28.7.14  where 14=current year
    Assert.assertEquals(DateUtils.getCurrentYear()+1-100 + "-07-28", dateParser.parseDate("28.7." + currentYearInTwoNumberFormatPlus(1))); // 28.7.15   where 15=current year + 1
    Assert.assertEquals("1930-07-28", dateParser.parseDate("28.7.30"));
    Assert.assertEquals("1940-07-28", dateParser.parseDate("28.7.40"));
    Assert.assertEquals("1950-07-28", dateParser.parseDate("28.7.50"));
    Assert.assertEquals("1905-07-05", dateParser.parseDate("5.7.1905"));
    Assert.assertEquals("2012-06", dateParser.parseDate("6/2012"));
    Assert.assertEquals("1930", dateParser.parseDate("30"));
    Assert.assertEquals("2005", dateParser.parseDate("05"));
View Full Code Here

Examples of fi.luomus.commons.utils.DateParserUtil.parseDate()

    Assert.assertEquals("2005-07-28", dateParser.parseDate("28.7.05"));
    Assert.assertEquals(DateUtils.getCurrentYear() + "-07-28", dateParser.parseDate("28.7." +  currentYearInTwoNumberFormat())); // 28.7.14  where 14=current year
    Assert.assertEquals(DateUtils.getCurrentYear()+1-100 + "-07-28", dateParser.parseDate("28.7." + currentYearInTwoNumberFormatPlus(1))); // 28.7.15   where 15=current year + 1
    Assert.assertEquals("1930-07-28", dateParser.parseDate("28.7.30"));
    Assert.assertEquals("1940-07-28", dateParser.parseDate("28.7.40"));
    Assert.assertEquals("1950-07-28", dateParser.parseDate("28.7.50"));
    Assert.assertEquals("1905-07-05", dateParser.parseDate("5.7.1905"));
    Assert.assertEquals("2012-06", dateParser.parseDate("6/2012"));
    Assert.assertEquals("1930", dateParser.parseDate("30"));
    Assert.assertEquals("2005", dateParser.parseDate("05"));
    Assert.assertEquals(""+DateUtils.getCurrentYear(), dateParser.parseDate(currentYearInTwoNumberFormat()));
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.