public class DatePartsNormalizer extends Object
DatePartsNormalizer.NormalizedYearMonthDay
if possible.
No validation will be applied to the normalized values.
Thread-Safe after creation.Modifier and Type | Class and Description |
---|---|
static class |
DatePartsNormalizer.NormalizedYearDayOfYear
Hold result of the normalization process.
|
static class |
DatePartsNormalizer.NormalizedYearMonthDay
Hold result of the normalization process.
|
Modifier and Type | Method and Description |
---|---|
Integer |
monthNameToNumerical(String month)
Often months come in the form Sept.
|
static DatePartsNormalizer |
newInstance() |
DatePartsNormalizer.NormalizedYearDayOfYear |
normalize(String year,
String dayOfYear)
Normalize date parts value.
|
DatePartsNormalizer.NormalizedYearMonthDay |
normalize(String year,
String month,
String day)
Normalize date parts value.
|
String |
normalizeFloat(String value)
Often values are seen as Float rather than int, due to a database export The year "1978" is actually seen as
"1978.0".
|
public static DatePartsNormalizer newInstance()
public DatePartsNormalizer.NormalizedYearMonthDay normalize(String year, String month, String day)
year
- month
- day
- public DatePartsNormalizer.NormalizedYearDayOfYear normalize(String year, String dayOfYear)
year
- dayOfYear
- public Integer monthNameToNumerical(String month)
month
- name to normalizepublic String normalizeFloat(String value)
value
- To checkCopyright © 2024 Global Biodiversity Information Facility (GBIF). All rights reserved.