TL;DR: Always use units when expressing data. Units are good.
Relates to shaarli/Shaarli#1227
Although most bookmarking services return dates formatted as a Unix epoch (seconds elapsed since 1970-01-01 00:00:00) or human-readable strings, some services return microtime epochs (microseconds elapsed since 1970-01-01 00:00:00.000000) WITHOUT using a delimiter for the microseconds part...
This PR adds some guesswork to the date parser so results fall within a resonable range, e.g.:
now - 30 years < parsed date < now + 30 years
This is likely to raise issues in the distant future!
TL;DR: Always use units when expressing data. Units are good.
Relates to shaarli/Shaarli#1227
Although most bookmarking services return dates formatted as a Unix epoch (seconds elapsed since
1970-01-01 00:00:00
) or human-readable strings, some services return microtime epochs (microseconds elapsed since1970-01-01 00:00:00.000000
) WITHOUT using a delimiter for the microseconds part...This PR adds some guesswork to the date parser so results fall within a resonable range, e.g.:
This is likely to raise issues in the distant future!
See: