Skip to content

v7.0.0

Compare
Choose a tag to compare
@joanllenas joanllenas released this 30 Dec 21:41
· 38 commits to master since this release

In this release

  • Relaxed how invalid dates are treated in format pipes.

BREAKING CHANGES

The following pipes:

  • dfnsFormatDistanceStrict
  • dfnsFormatDistanceStrictPure
  • dfnsFormatDistanceToNow
  • dfnsFormatDistanceToNowPure
  • dfnsFormatDistance
  • dfnsFormatDistancePure
  • dfnsFormat
  • dfnsFormatPure

don't throw an exception anymore when an invalid date is provided, an empty string is returned instead.

TL;DR;

This change only affects you in case you were calling any of those pipes programmatically and using the exception via a try catch statement. If this is the case, you can now safely remove the try catch and check for an empty string instead.