Needs work
Project:
Date
Version:
7.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Aug 2012 at 20:59 UTC
Updated:
12 Nov 2018 at 17:03 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
karens commentedAs noted in the documentation and numerous other issues, you have to escape characters that are not a part of the date format string, i.e. \@.
Comment #2
kiwimind commentedUnfortunately this does not seem to be the case. I have a date formatter as D M j \@ H:i and the @ still shows at the end of the string when it is being written to the page.
I have also tried double escaping it (D M j \\@ H:i) and the same applies.
I have had a pick through some of the other issues, which seem to be more about the date being output twice. This is not the case for me.
Screengrabs:
format stringviews date format selectionoutputComment #3
monish_deb commentedI have gone through the issue and found the reason why the '@' is appended at the end of the Date string. The issue was occurring in
theme_date_display_combination() function where at line 134
$timezone = $dates['value']['formatted_timezone'];(Here $date is the formatted date array set in date_formatter_process() function at date.module file)
The format string for timezone leaves '@' which is then replaced from date value at line 138
Later on appended at end of the date string at line 230 of theme_date_display_single() function
return '<span class="date-display-single"' . drupal_attributes($attributes) . '>' . $date . $timezone . '</span>';I am submitting the patch for this issue but I think there must be a $replace array like in date_limit_format() at date_api.module which replaces such character from formatted timezone, formatted time etc. Any suggestion?
Comment #4
wigglykoala commentedI believe this to be a duplicate of https://drupal.org/node/1976898
Creating a custom module with the code provided on the other issue fixed the problem for me. I didn't try the above patch but I too had this problem. Escaping a dash didn't work and no matter what I put in the formatter the non english character would end up at the end of the string.
Comment #4.0
wigglykoala commentedSpelling error.
Comment #5
damienmckennaThanks for the patch, we'll try to review it soon.
BTW when you upload a patch it helps to set the status to "needs review", that triggers the testbots and lets others know that there's something review.
Comment #7
steinmb commented