use of org.apache.jena.sparql.util.DateTimeStruct in project jena by apache.
the class TestDateTimeParsing method testGMonthDay_2.
@Test
public void testGMonthDay_2() {
DateTimeStruct dt = DateTimeStruct.parseGMonthDay("--10-31Z");
check(dt, null, null, "10", "31", "Z");
}
use of org.apache.jena.sparql.util.DateTimeStruct in project jena by apache.
the class TestDateTimeParsing method dateTest.
private static void dateTest(String str) {
DateTimeStruct dt = DateTimeStruct.parseDate(str);
assertFalse(dt.xsdDateTime);
check(dt);
assertEquals(str, dt.toString());
}
use of org.apache.jena.sparql.util.DateTimeStruct in project jena by apache.
the class TestDateTimeParsing method testD_10.
@Test
public void testD_10() {
DateTimeStruct dt = DateTimeStruct.parseDate("2007-08-31");
check(dt, null, "2007", "08", "31", null);
}
use of org.apache.jena.sparql.util.DateTimeStruct in project jena by apache.
the class TestDateTimeParsing method dateTimeTest.
// ----
private static void dateTimeTest(String str) {
DateTimeStruct dt = DateTimeStruct.parseDateTime(str);
assertTrue(dt.xsdDateTime);
check(dt);
assertEquals(str, dt.toString());
}
use of org.apache.jena.sparql.util.DateTimeStruct in project jena by apache.
the class TestDateTimeParsing method dateBad.
private static void dateBad(String str) {
try {
DateTimeStruct dt = DateTimeStruct.parseDateTime(str);
fail("No exception; " + str);
} catch (DateTimeStruct.DateTimeParseException ex) {
}
}
Aggregations