-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
π Wrong dateUntil
when start_date.day == 29 || 30 || 31
& end_date.day == 28 || 29 || 30 || 31
#13
Comments
@nitin2953 , thank you for this incredibly comprehensive bug reports. One of the best bug reports I've seen. I can confirm, this is a bug. I'll fix while I'm refactoring for the next release (more info: https://github.com/fullcalendar/temporal#project-update-2023-04-22) |
Any ETA on next release? :) |
Hi @digaus, please see my update here: #3 (comment) (I'm essentially using that thread as a tracking issue for the next release). |
This is fixed in v0.2.0. Please confirm when you have a chance. Thanks! |
Hi @arshaw, |
Hi @nitin2953, I've updated your repro repo here: It's been updated to use the latest "playground" from tc39's reference implementation as well as fullcalendar's temporal-polyfill latest version 0.2.4 I've tried a number of the error cases you originally posted and don't see any difference in behavior between the reference implementation and fullcalendar's polyfill. The diffing algorithm changed in the tc39 spec a few months ago, and fullcalendar's polyfill adapted to those changes, so maybe you're comparing the new version of one implementation to the old version of the other |
Interactive test https://datediff.netlify.app/
Repo https://github.com/nitin2953/date-diff-test
STARTING WITH 29
Wrong Diff if
end_date
is 28 Feb (not 29) (Future Only)DD MMM YYYY
DD MMM YYYY
29 Jan 2022
28 Feb 2020
-1Y -11M -01D
-1Y -11M -01D
29 Jan 2022
29 Feb 2020
-1Y -11M 00D
-1Y -11M 00D
29 Jan 2022
01 Mar 2020
-1Y -10M -28D
-1Y -10M -28D
29 Jan 2022
27 Feb 2021
0Y -11M -01D
0Y -11M -01D
29 Jan 2022
28 Feb 2021
0Y -11M 00D
0Y -11M 00D
29 Jan 2022
01 Mar 2021
0Y -10M -28D
0Y -10M -28D
29 Jan 2022
27 Feb 2022
0Y 00M 29D
0Y 00M 29D
29 Jan 2022
28 Feb 2022
0Y 01M 00D
0Y 00M 30D
29 Jan 2022
01 Mar 2022
0Y 01M 01D
0Y 01M 01D
29 Jan 2022
27 Feb 2023
1Y 00M 29D
1Y 00M 29D
29 Jan 2022
28 Feb 2023
1Y 01M 00D
1Y 00M 30D
29 Jan 2022
01 Mar 2023
1Y 01M 01D
1Y 01M 01D
29 Jan 2022
28 Feb 2024
2Y 00M 30D
2Y 00M 30D
29 Jan 2022
29 Feb 2024
2Y 01M 00D
2Y 01M 00D
29 Jan 2022
01 Mar 2024
2Y 01M 01D
2Y 01M 01D
29 Jan 2022
27 Feb 2025
3Y 00M 29D
3Y 00M 29D
29 Jan 2022
28 Feb 2025
3Y 01M 00D
3Y 00M 30D
29 Jan 2022
01 Mar 2025
3Y 01M 01D
3Y 01M 01D
STARTING WITH 30
Wrong Diff if
end_date
is 28/29 Feb (Future Only)DD MMM YYYY
DD MMM YYYY
30 Jan 2022
28 Feb 2020
-1Y -11M -01D
-1Y -11M -01D
30 Jan 2022
29 Feb 2020
-1Y -11M 00D
-1Y -11M 00D
30 Jan 2022
01 Mar 2020
-1Y -10M -29D
-1Y -10M -29D
30 Jan 2022
27 Feb 2021
0Y -11M -01D
0Y -11M -01D
30 Jan 2022
28 Feb 2021
0Y -11M 00D
0Y -11M 00D
30 Jan 2022
01 Mar 2021
0Y -10M -29D
0Y -10M -29D
30 Jan 2022
27 Feb 2022
0Y 0M 28D
0Y 0M 28D
30 Jan 2022
28 Feb 2022
0Y 1M 00D
0Y 0M 29D
30 Jan 2022
01 Mar 2022
0Y 1M 01D
0Y 1M 01D
30 Jan 2022
27 Feb 2023
1Y 0M 28D
1Y 0M 28D
30 Jan 2022
28 Feb 2023
1Y 1M 00D
1Y 0M 29D
30 Jan 2022
01 Mar 2023
1Y 1M 01D
1Y 1M 01D
30 Jan 2022
28 Feb 2024
2Y 0M 29D
2Y 0M 29D
30 Jan 2022
29 Feb 2024
2Y 1M 00D
2Y 0M 30D
30 Jan 2022
01 Mar 2024
2Y 1M 01D
2Y 1M 01D
30 Jan 2022
27 Feb 2025
3Y 0M 28D
3Y 0M 28D
30 Jan 2022
28 Feb 2025
3Y 1M 00D
3Y 0M 29D
30 Jan 2022
01 Mar 2025
3Y 1M 01D
3Y 1M 01D
STARTING WITH 31
Wrong Diff if
total_days
&end_date.day
is 30 AND at 28/29 Feb (Future Only)total_days
inend_date.month
DD MMM YYYY
DD MMM YYYY
31 Jan 2022
28 Feb 2022
0Y 01M 0D
0Y 0M 28D
28
31 Jan 2022
31 Mar 2022
0Y 02M 0D
0Y 2M 00D
31
31 Jan 2022
30 Apr 2022
0Y 03M 0D
0Y 2M 30D
30
31 Jan 2022
31 May 2022
0Y 04M 0D
0Y 4M 00D
31
31 Jan 2022
30 Jun 2022
0Y 05M 0D
0Y 4M 30D
30
31 Jan 2022
31 Jul 2022
0Y 06M 0D
0Y 6M 00D
31
31 Jan 2022
31 Aug 2022
0Y 07M 0D
0Y 7M 00D
31
31 Jan 2022
30 Sep 2022
0Y 08M 0D
0Y 7M 30D
30
31 Jan 2022
31 Oct 2022
0Y 09M 0D
0Y 9M 00D
31
31 Jan 2022
30 Nov 2022
0Y 10M 0D
0Y 9M 30D
30
31 Jan 2022
31 Dec 2022
0Y 11M 0D
0Y 11M 0D
31
31 Jan 2022
31 Jan 2023
1Y 00M 0D
1Y 0M 00D
31
31 Jan 2022
28 Feb 2023
1Y 01M 0D
1Y 0M 28D
28
31 Jan 2022
29 Feb 2024
2Y 01M 0D
2Y 0M 29D
29
The text was updated successfully, but these errors were encountered: