Package edu.uams.dbmi.util.iso8601

Examples of edu.uams.dbmi.util.iso8601.Iso8601TimeFormatter


    assertEquals(cal.get(Calendar.DAY_OF_YEAR), da)
  }
 
  @Test
  public void testExtendedYearParse() {
    Iso8601DateParser parser = new Iso8601DateParser();
    parser.setExtraYearDigits(2);
   
    String s1 = "+001988-03-02";
    try {
      testYearMonthDayString(parser, s1, 1988, 3, 2);
    } catch (Iso8601DateParseException e) {
View Full Code Here


        extendedHrMinSecSs);
  }
 
  public void testConfigurations(Iso8601UnitTime t, String basicAns,
      String extendedAns) {
    FormatOptions fo = new FormatOptions();
    fo.setExtended(false);
    fo.setIncludeTzMinIfZero(true);
    fo.setPrecedeWithT(false);
   
    Iso8601TimeFormatter tf = new Iso8601TimeFormatter(fo);
    assertEquals(tf.format(t), basicAns);
   
    fo.setPrecedeWithT(true);
    tf = new Iso8601TimeFormatter(fo);
    assertEquals(tf.format(t), "T" + basicAns);
   
    fo.setPrecedeWithT(false);
    fo.setExtended(true);
    tf = new Iso8601TimeFormatter(fo);
    assertEquals(tf.format(t), extendedAns);
   
    fo.setPrecedeWithT(true);
    tf = new Iso8601TimeFormatter(fo);
    assertEquals(tf.format(t), "T" + extendedAns);
  }
View Full Code Here

TOP

Related Classes of edu.uams.dbmi.util.iso8601.Iso8601TimeFormatter

Copyright © 2018 www.massapicom. 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.