use of nl.knaw.huygens.timbuctoo.model.Datable in project timbuctoo by HuygensING.
the class DatableTest method convertYear_month_range.
@Test
public void convertYear_month_range() {
Assert.assertTrue(EdtfPattern.YEAR_MONTH_RANGE.matches("2010-??"));
Assert.assertFalse(EdtfPattern.YEAR_MONTH_RANGE.matches("201?"));
Assert.assertFalse(EdtfPattern.YEAR_MONTH_RANGE.matches("2010-02-13"));
testDatable("2010-01-01:12", "2010-12-31:12", Datable.Certainty.MEDIUM, new Datable("2010-??"));
}
use of nl.knaw.huygens.timbuctoo.model.Datable in project timbuctoo by HuygensING.
the class DatableTest method convertYear_month_day_h.
@Test
public void convertYear_month_day_h() {
String edtf = "1648-05-15";
Assert.assertTrue(EdtfPattern.YEAR_MONTH_DAY_H.matches(edtf));
testDatable("1648-05-15:12", "1648-05-15:12", Datable.Certainty.HIGH, new Datable(edtf));
}
use of nl.knaw.huygens.timbuctoo.model.Datable in project timbuctoo by HuygensING.
the class DatableTest method convertYear_range_q3.
@Test
public void convertYear_range_q3() {
Assert.assertTrue(EdtfPattern.YEAR_RANGE_Q3.matches("2???"));
Assert.assertFalse(EdtfPattern.YEAR_RANGE_Q3.matches("2010"));
Assert.assertFalse(EdtfPattern.YEAR_RANGE_Q3.matches("2???-02-13"));
testDatable("2000-01-01:12", "2999-12-31:12", Datable.Certainty.LOW, new Datable("2???"));
}
use of nl.knaw.huygens.timbuctoo.model.Datable in project timbuctoo by HuygensING.
the class DatableTest method testCompareToSmaller.
@Test
public void testCompareToSmaller() {
Datable first = new Datable("20131010");
Datable second = new Datable("20131011");
assertEquals(-1, first.compareTo(second));
}
use of nl.knaw.huygens.timbuctoo.model.Datable in project timbuctoo by HuygensING.
the class DatableTest method convertYear_q.
@Test
public void convertYear_q() {
Assert.assertTrue(EdtfPattern.YEAR_Q.matches("2010?"));
Assert.assertFalse(EdtfPattern.YEAR_Q.matches("2010"));
Assert.assertFalse(EdtfPattern.YEAR_Q.matches("2010-02-13?"));
testDatable("2010-01-01:12", "2010-12-31:12", Datable.Certainty.LOW, new Datable("2010?"));
}
Aggregations