Skip to content

Conversation

@Ayo1984
Copy link
Contributor

@Ayo1984 Ayo1984 commented Oct 26, 2025

This PR enhances the dev-helper plugin by adding a developer warning when .diff() is called without a valid comparison date.

Added unit tests to cover:
Missing comparison date
Invalid (unparsable) string
Valid date strings and Day.js instances (no warning)

Thanks for the earlier feedback in #2945 — this implementation follows the agreed approach to keep behavior consistent with Moment.js while improving developer guidance through dev-helper.

@iamkun iamkun merged commit 269a7a9 into iamkun:dev Oct 27, 2025
1 check passed
@iamkun
Copy link
Owner

iamkun commented Oct 27, 2025

Looks cool. THX

github-actions bot pushed a commit that referenced this pull request Oct 31, 2025
## [1.11.19](v1.11.18...v1.11.19) (2025-10-31)

### Bug Fixes

* added usage warnings for diff + updated unit tests ([#2948](#2948)) ([269a7a9](269a7a9))
* dont instantiate regexes within ar locale functions to avoid performance overhead ([#2898](#2898)) ([af5e9f0](af5e9f0))
* replace italian locale "un' ora fa" with "un'ora fa", add tests for it ([#2930](#2930)) ([9e9f76c](9e9f76c))
* Updated Belarusian locale with relative time ([#2656](#2656)) ([1d8746c](1d8746c))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants