Closed (fixed)
Project:
Date range formatter
Version:
9.0.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Feb 2018 at 20:47 UTC
Updated:
21 Jul 2023 at 01:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
noah commentedComment #3
pameeela commented+1 to this, it is confusing because it works just fine with time.
Comment #4
ramya balasubramanian commentedHi @noah, @pameela,
Date Range(without time formatter) is confusing , so for that I have changed the label and ID as 'Date Range'. Please let me know if anything needs to be changed.
Comment #5
ramya balasubramanian commentedAs per above suggestions, I have uploaded the patch. Please have a look and let me know if there are any issues.
Comment #6
pameeela commentedLooks good to me.
Comment #7
sudishth commentedhi @ramya
we need to update the hook for the existing used field formatter config
Comment #10
darrick commentedComment #11
darrick commentedI would like to add support for examples like: "Wed 1 - 1:30PM Jun 9, 2022" instead of "Wed 1:00PM - 1:30PM Jun 9, 2022". I.e. setting to strip out minutes if 0 and setting to only show "meridiem" for end_value if equal to the start_value.
That would be like adding "Same AM/PM" and "Strip 00 times".
Before doing that I thought it would be better to swat this issue. Because maybe it is best to have one formatter for Date Only ranges and then inherit that formatter for a Date and Time formatter with the extra options for time.
From a user perspective I can see that "Date Range" make sense. But from a developer perspective I see that date_range_without_time makes sense as operationally no formatting decisions are being made based off the value of the time part only on the value of the date part.
Comment #14
sudishth commentedThanks for patch
Comment #16
leo liao commentedConfigManagerInterface::findConfigEntityDependentsAsEntities() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Instead you should use ConfigManagerInterface::findConfigEntityDependenciesAsEntities(). See https://www.drupal.org/node/3225357