use of nl.knaw.huygens.timbuctoo.model.Datable in project timbuctoo by HuygensING.
the class DatableTest method convertYear_range_q1.
@Test
public void convertYear_range_q1() {
Assert.assertTrue(EdtfPattern.YEAR_RANGE_Q1.matches("201?"));
Assert.assertFalse(EdtfPattern.YEAR_RANGE_Q1.matches("2010"));
Assert.assertFalse(EdtfPattern.YEAR_RANGE_Q1.matches("201?-02-13"));
testDatable("2010-01-01:12", "2019-12-31:12", Datable.Certainty.LOW, new Datable("201?"));
}
use of nl.knaw.huygens.timbuctoo.model.Datable in project timbuctoo by HuygensING.
the class DatableTest method testGetUpperLimit.
@Test
public void testGetUpperLimit() {
Datable datable = new Datable("2013");
assertThat(datable.getUpperLimit(), equalTo(getStringAsObject("20131231")));
}
use of nl.knaw.huygens.timbuctoo.model.Datable in project timbuctoo by HuygensING.
the class DatableTest method convertDay_month_year.
@Test
public void convertDay_month_year() {
Assert.assertTrue(EdtfPattern.DAY_MONTH_YEAR.matches("06-03-1854"));
Assert.assertTrue(EdtfPattern.DAY_MONTH_YEAR.matches("6-3-1854"));
testDatable("1854-03-06:12", "1854-03-06:12", Datable.Certainty.HIGH, new Datable("06-03-1854"));
}
use of nl.knaw.huygens.timbuctoo.model.Datable in project timbuctoo by HuygensING.
the class DatableTest method convertYear_month_day_ha.
@Test
public void convertYear_month_day_ha() {
String edtf = "1648-05-15~";
Assert.assertTrue(EdtfPattern.YEAR_MONTH_DAY_HA.matches(edtf));
testDatable("1648-05-15:12", "1648-05-15:12", Datable.Certainty.MEDIUM, new Datable(edtf));
}
use of nl.knaw.huygens.timbuctoo.model.Datable in project timbuctoo by HuygensING.
the class DatableTest method convertYear_month_day_a.
@Test
public void convertYear_month_day_a() {
String edtf = "16480515~";
Assert.assertTrue(EdtfPattern.YEAR_MONTH_DAY_A.matches(edtf));
testDatable("1648-05-15:12", "1648-05-15:12", Datable.Certainty.MEDIUM, new Datable(edtf));
}
Aggregations