-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Background
In #61, support for infinity values was added. In the implementation, the infinity values need to have the same pattern as the input values. For example, if the input values have pattern yyyy-MM-dd,
then the infinity values need to be specified as e.g. 1000-01-01
or 9999-01-01
.
This is a problem for the pattern yyMMdd
, because the minimal date for this pattern is 2000/01/01. (If the original type is integer, it's even 2010/01/01, because leading zeros can't be interpreted currently and lead to standardization error).
Similarly, for a unix timestamp, the minimal date would be 1970/01/01 and maximum 2038/01/19. For the century pattern, the minimum is 1900/01/01 and the maximum 2899/12/31
In general, the minimal and maximum infinity values depend on the date pattern, so a consumer of the data needs to know the original date pattern to interpret the meaning of infinity values, which defeats the purpose of standardization.
By allowing a separate pattern for the infinity values (e.g. yyyyMMdd), the same infinity value can be used irrespective of the pattern of the original value, e.g. 9999-12-31 could be configured even for patterns yyMMdd or epoch
Feature
- Support a separate pattern for the infinity values (or assume an ISO pattern)
- Cast infinity values directly to date or timestamp, not to the original type
Example [Optional]
A simple example if applicable.
Proposed Solution [Optional]
Solution Ideas:
1.
2.
3.