FnDateTime is a function hub class containing a lot of static methods to convert from various input objects to DateTime. Those static methods return functions whose output is DateTime and whose input can be Calendar, Date, Integer list and Long among others.
Function name | Type | Params | Description |
---|---|---|---|
calendarToDateTime | Function<T, DateTime> | It converts a Calendar into a DateTime | |
calendarToDateTime | Function<T, DateTime> | DateTimeZone dateTimeZone | It converts a Calendar into a DateTime in the given DateTimeZone |
calendarToDateTime | Function<T, DateTime> | Chronology chronology | It converts a Calendar into a DateTime with the given Chronology |
dateToDateTime | Function<T, DateTime> | The input Date is converted into a DateTime | |
dateToDateTime | Function<T, DateTime> | DateTimeZone dateTimeZone | The input Date is converted into a DateTime configured with the given DateTimeZone |
dateToDateTime | Function<T, DateTime> | Chronology chronology | The input Date is converted into a DateTime with the given Chronology |
integerFieldArrayToDateTime | Function<Integer[], DateTime> | A DateTime is created from the given Integer array. The valid input Integer[] are:
| |
integerFieldArrayToDateTime | Function<Integer[], DateTime> | Chronology chronology | A DateTime is created from the given Integer array. The result will be created with the given Chronology The valid input Integer[] are:
|
integerFieldCollectionToDateTime | Function<Collection<Integer>, DateTime> | A DateTime is created from the input Integer Collection. The valid input Collection<Integer> are:
| |
integerFieldCollectionToDateTime | Function<Collection<Integer>, DateTime> | Chronology chronology | A DateTime is created from the input Integer Collection. The result will be created with the given Chronology The valid input Collection<Integer> are:
|
longToDateTime | Function<Long, DateTime> | The input Long representing the time in milliseconds is converted into a DateTime | |
longToDateTime | Function<Long, DateTime> | DateTimeZone dateTimeZone | The input Long representing the time in milliseconds is converted into a DateTime in the given DateTimeZone |
longToDateTime | Function<Long, DateTime> | Chronology chronology | The input Long representing the time in milliseconds is converted into a DateTime with the given Chronology |
strFieldArrayToDateTime | Function<String[], DateTime> | A DateTime is created from the given String array. The valid input String[] are:
| |
strFieldArrayToDateTime | Function<String[], DateTime> | Chronology chronology | A DateTime is created from the given String array. The result will be created with the given Chronology The valid input String[] are:
|
strFieldCollectionToDateTime | Function<Collection<String>, DateTime> | A DateTime is created from the given String Collection. The valid input Collection<String> are:
| |
strFieldCollectionToDateTime | Function<Collection<String>, DateTime> | Chronology chronology | A DateTime is created from the given String Collection. The result will be created with the given Chronology The valid input Collection<String> are:
|
strToDateTime | Function<String, DateTime> | String pattern | It converts the input String into a DateTime using the given pattern parameter. If the pattern includes either, the name of the month or day of week, a conversion accepting a Locale must be used instead |
strToDateTime | Function<String, DateTime> | String pattern DateTimeZone dateTimeZone | It converts the input String into a DateTime using the given pattern parameter and with the given DateTimeZone. If the pattern includes either, the name of the month or day of week, a conversion accepting a Locale must be used instead |
strToDateTime | Function<String, DateTime> | String pattern Chronology chronology | It converts the input String into a DateTime using the given pattern parameter and with the given Chronology. If the pattern includes either, the name of the month or day of week, a conversion accepting a Locale must be used instead |
strToDateTime | Function<String, DateTime> | String pattern Locale locale | It converts the input String into a DateTime using the given pattern and Locale parameters |
strToDateTime | Function<String, DateTime> | String pattern String locale | It converts the given String into a DateTime using the given pattern and Locale parameters |
strToDateTime | Function<String, DateTime> | String pattern Locale locale DateTimeZone dateTimeZone | It converts the given String into a DateTime using the given pattern and Locale parameters. The DateTime is configured with the given DateTimeZone |
strToDateTime | Function<String, DateTime> | String pattern String locale DateTimeZone dateTimeZone | It converts the given String into a DateTime using the given pattern and Locale parameters. The DateTime is configured with the given DateTimeZone |
strToDateTime | Function<String, DateTime> | String pattern Locale locale Chronology chronology | It converts the input String into a DateTime using the given pattern and Locale parameters. The DateTime will be created with the given Chronology |
strToDateTime | Function<String, DateTime> | String pattern String locale Chronology chronology | It converts the input String into a DateTime using the given pattern and Locale parameters. The DateTime will be created with the given Chronology |
timestampToDateTime | Function<Timestamp, DateTime> | The input Timestamp is converted into a DateTime | |
timestampToDateTime | Function<Timestamp, DateTime> | DateTimeZone dateTimeZone | The input Timestamp is converted into a DateTime in the given DateTimeZone |
timestampToDateTime | Function<Timestamp, DateTime> | Chronology chronology | The input Timestamp is converted into a DateTime with the given Chronology |