Encountering a strange issue with Luxon when the Interval.after
method is invoked within the library.
const interval = Interval.after(dateTime, duration);
The following log pertains to the application DateTime__Duration
, with the second line representing the output of Interval.after
:
1535806800000__PT330M
[2018-09-01T16:00:00.000+03:00 – 2018-09-01T21:30:00.000+03:00)
However, upon passing these values to the library method and examining the log there:
1535806800000__PT330M
Invalid Interval
The reason cited is "invalid endpoints." Confirming via isValid
for both DateTime
and Duration
yields true.
If DateTime
and Duration
are initialized in the identical manner as in the application, then Interval.after
functions correctly within the library.
const interval2 = Interval.after(DateTime.fromISO('2018-09-01T16:00:00.000+03:00',
{zone: 'Europe/Helsinki'}), Duration.fromObject({ minutes: 330 }));
Both invocations employ the same objects, yet Interval.after
exclusively works within the application. Any insights on what may be causing this?
UPDATE
This anomaly seemingly correlates with the DateTime
. Is it possible for it to function differently in the app as opposed to the library despite identical Luxon versions? It is my understanding that Luxon has no external dependencies.
UPDATE 2
A reproducible version of this configuration has been created. Links to download the sources for both the application and library can be found at
To locally integrate the library into the app, I utilized yarn link
in the library and yarn link "luxon-test-lib"
in the application afterwards.