I know that this is very minor, but the proper way to indicate a date range is with an en dash, not a hyphen.

http://www.alistapart.com/stories/emen/

Files: 
CommentFileSizeAuthor
date_range_endash.patch1.32 KBdboulet

Comments

Les Lim’s picture

Status:Needs review» Reviewed & tested by the community

+1 for this patch. It seems harmless enough to me to go directly to RTBC.

babbage’s picture

Priority:Minor» Normal

Maybe a minor patch, but the current default looks horrible rendered in a large font so this is important to correct. I was about to create my own patch for same when found this one.

I wondered about using the HTML entity instead, since it would make the code more easily comprehended:
–

Personally, if it'd been my patch being uploaded I would also have eliminated the spaces on either side of the en dash. However, I've done some research to see if this was a sufficient accepted "rule" and have concluded there seems to be equal weight on both sides of the debate (for the web, as opposed to for print) so I will not complicate this further. :)

I concur. This should be committed.

dboulet’s picture

I did consider removing the spaces surrounding the en dash, but decided against it after reading this from the Wikipedia:Manual of Style:

Date ranges are preferably given with minimal repetition, using an unspaced en dash where the range involves numerals alone (5–7 January 1979; January 5–7, 2002) or a spaced en dash where opening and/or closing dates have internal spaces (5 January – 18 February 1979; January 5 – February 18, 1979).

Makes sense to me to use a spaced en dash in this case, since full dates are usually used.

KarenS’s picture

Status:Reviewed & tested by the community» Fixed

Simple enough indeed. Thanks!

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

KarenS’s picture

I had to revert this change, it caused other problems #452420: en Dash causes problem in ANT. You can make the change in your own theme if you want it.

dboulet’s picture

Status:Closed (fixed)» Active

That’s really unfortunate, I don't think it’s fair to force everyone who wants proper web typography to implement a rather large theme function just to change a few hyphens. In my opinion, if a module isn’t recognizing HTML entities properly, the problem resides with that module.

If we really can’t use the patch originally posted here, then I would suggest finding an alternate method. Here are a few ideas:

  • Is it possible to insert an en dash directly into the code, instead of using the HTML entity?
  • Can we at least make the separator itself themeable, using a function such as theme_date_separator(), to make it easier to override?

I’m going to set this back to active, and hopefully others will give their opinion on this.

KarenS’s picture

Category:bug» feature

This is actually a feature request, not a bug report. The second option above would be the easiest and least likely to create problems.

It should be pretty easy to make a patch for this, but I don't have time right now. If someone wants to work on it, I'll be glad to look at it.

dboulet’s picture

Status:Active» Closed (won't fix)

I've started a separate issue regarding the addition of the theme_date_separator() function: #456460: Make date range separator themeable. If the patch from that issue gets committed, then all that will be needed to use an en dash as a separator will be to include the following code in the active theme's template.php file:

function phptemplate_date_separator() {
  return '<span class="date-display-separator"> &#38;#8211; </span>';
}

Although I still think that the module's default should be a dash and not a hyphen, I'll mark this as 'won't fix' for now.