Closed (duplicate)
Project:
Drupal core
Version:
8.4.x-dev
Component:
datetime.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Mar 2018 at 15:49 UTC
Updated:
2 Mar 2018 at 14:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
byrond commentedThis patch uses the formatted date to determine whether both start and end dates need to be displayed.
Comment #3
mpdonadioThanks for reporting a bug and posting a patch.
Can you merge your work into #2823847: DateRange formatters should compare rendered dates instead of raw timestamps? I think you can take your formatter code and that patch's test, and we should be pretty close. We started this a while ago, and I want to make sure everyone gets credit.
Thanks!
Quick look:
Since building date strings is an expensive operation, I think we want to save them into a variable so we don't need to rebuild for the render array.