Examples of DatePrecision


Examples of org.dcm4che3.data.DatePrecision

    @Test
    public void testFormatDTwithTZ() {
        assertEquals("19700101020000.000+0200",
                DateUtils.formatDT(tz, new Date(0),
                        new DatePrecision(Calendar.MILLISECOND, true)));
    }
View Full Code Here

Examples of org.dcm4che3.data.DatePrecision

                DateUtils.parseDA(tz, "19700101", true).getTime());
    }

    @Test
    public void testParseTM() {
        DatePrecision precision = new DatePrecision();
        assertEquals(0,
                DateUtils.parseTM(tz, "020000.000", precision).getTime());
        assertEquals(Calendar.MILLISECOND, precision.lastField);
    }
View Full Code Here

Examples of org.dcm4che3.data.DatePrecision

        assertEquals(Calendar.MILLISECOND, precision.lastField);
    }

    @Test
    public void testParseTMacrnema() {
        DatePrecision precision = new DatePrecision();
        assertEquals(0,
                DateUtils.parseTM(tz, "02:00:00", precision).getTime());
        assertEquals(Calendar.SECOND, precision.lastField);
    }
View Full Code Here

Examples of org.dcm4che3.data.DatePrecision

        assertEquals(Calendar.SECOND, precision.lastField);
    }

    @Test
    public void testParseTMceil() {
        DatePrecision precision = new DatePrecision();
        assertEquals(MINUTE - 1,
                DateUtils.parseTM(tz, "0200", true, precision).getTime());
        assertEquals(Calendar.MINUTE, precision.lastField);
    }
View Full Code Here

Examples of org.dcm4che3.data.DatePrecision

        assertEquals(Calendar.MINUTE, precision.lastField);
    }

    @Test
    public void testParseDT() {
        DatePrecision precision = new DatePrecision();
        assertEquals(0,
                DateUtils.parseDT(tz, "19700101020000.000", precision).getTime());
        assertEquals(Calendar.MILLISECOND, precision.lastField);
        assertFalse(precision.includeTimezone);
    }
View Full Code Here

Examples of org.dcm4che3.data.DatePrecision

        assertFalse(precision.includeTimezone);
    }

    @Test
    public void testParseWithTZ() {
        DatePrecision precision = new DatePrecision();
        assertEquals(2 * HOUR,
                DateUtils.parseDT(tz, "19700101020000.000+0000", precision).getTime());
        assertEquals(Calendar.MILLISECOND, precision.lastField);
        assertTrue(precision.includeTimezone);
    }
View Full Code Here

Examples of org.dcm4che3.data.DatePrecision

        assertTrue(precision.includeTimezone);
    }

    @Test
    public void testParseDTceil() {
        DatePrecision precision = new DatePrecision();
        assertEquals(YEAR - 2 * HOUR - 1,
                DateUtils.parseDT(tz, "1970", true, precision).getTime());
        assertEquals(Calendar.YEAR, precision.lastField);
        assertFalse(precision.includeTimezone);
    }
View Full Code Here

Examples of org.dcm4che3.data.DatePrecision

            StringBuilder toAppendTo) {
        return formatDT(cal(tz, date), toAppendTo, Calendar.DAY_OF_MONTH);
    }

    public static String formatTM(TimeZone tz, Date date) {
        return formatTM(tz, date, new DatePrecision());
    }
View Full Code Here

Examples of org.dcm4che3.data.DatePrecision

        }
        return toAppendTo;
    }

    public static String formatDT(TimeZone tz, Date date) {
        return formatDT(tz, date, new DatePrecision());
    }
View Full Code Here

Examples of org.dcm4che3.data.DatePrecision

     */
    @Test
    public void testSetDateLongDate() {
        Attributes a = new Attributes();
        a.setDate(Tag.StudyDateAndTime,
                DateUtils.parseDT(null, "20110404150000.000", new DatePrecision()));
        assertEquals("20110404", a.getString(Tag.StudyDate, null));
        assertEquals("150000.000", a.getString(Tag.StudyTime, null));
    }
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.