Correct hyphen: Unicode HYPHEN or HYPHEN-MINUS

On dates, not date ranges, but dates (2021-05-24), most are hyphen minus. I’m noticing that some scripts, i.e. script to help out with proper hyphens, apostrophes, etc. and the one to devise dates from titles, etc for comments are correcting those hyphens in the dates to true hyphens. Is it proper to use true hyphens in dates formatted like this?

2 Likes

Yes, it is proper to use true hyphens.

From ISO-8601: In representations the following characters are used as separators: [-] (hyphen): to separate the time elements “year” and “month”, “year” and “week”, “year” and “day”, “month” and “day”, and “week” and “day”;

In an environment where use is made of a character repertoire based on ISO/IEC 646, “hyphen” and “minus” are both mapped onto “hyphen-minus”

4 Likes

Thanks! I couldn’t find that.

Is this text extracted from when you buy the ISO 8601 norm document?
I found a so called ISO.org website but everything (detailed docs) seems for sale at a store.

1 Like

It is from the draft version linked at wikipedia, Wayback Machine

I think while it probably isn’t a perfect match for the final standard it is likely close enough for this detail.

2 Likes

But even the MB Website used HYPHEN-MINUS for the date representation:
image

1 Like

I submitted a ticket for this.

ISO themselves don’t even use hyphen.

3.2 Symbols

3.2.1 General

Representations and expressions specified in this document make use of the symbols listed in 3.2.2 through 3.2.6.

Representations (also referred to as “format representations”) give rise to expressions for dates, times, intervals and recurring intervals.

EXAMPLE 1

[YYYY] is a format representation for a calendar year, where each Y is to be replaced by a single digit creating an expression, for example ‘1985’.

EXAMPLE 2

The date and time representation [YYYY][“-”][MM][“-”][DD] gives rise to the expression ‘2003-02-10’ which identifies 10 February 2003.

To clearly separate date and time representations from the text, punctuation marks and associated symbols used to describe them, the following symbols are used to demarcate boundaries of expressions and representations in this document:

  • — single quotation marks enclose expressions (for example ‘1985’); in some cases they are omitted to reflect the actualities of the examples; they are omitted in Clause 5;

  • — all individual tokens that are part of a representation are contained between the open and close bracket symbols (“[“ and “]”);

EXAMPLE 3

For the date and time representation [YYYY][“-”][MM][“-”][DD], [YYYY], [“-”], [MM], [“-”], and [DD] are individual tokens enclosed by brackets.

  • — when double quotations marks enclose a string within a representation, that string is literal and becomes part of any expression of that representation.

EXAMPLE 4

The representation [i][“Y”] represents a positive integer followed by the symbol “Y”. ‘12Y’ meaning “12 years” is an expression of that representation.

Quotation marks and brackets are not part of the expression or representation itself and shall be omitted in implementation.

All characters used in date and time expressions and representations are part of the ISO/IEC 646 repertoire, except for “hyphen”, “minus” and “plus-minus”. In an environment where use is made of a character repertoire based on ISO/IEC 646, “hyphen” and “minus” should be both mapped onto “hyphen-minus”.

In this excerpt, you can see the use of “fancy” punctuation like “ (U+201C), ” (U+201D), ‘ (U+2018), ’ (U+2019), and — (U+2014)… but never ‐ (U+2010). They actually use hyphen-minus themselves.

2 Likes

Whichever is used, I’d like for them to be non-breaking hyphens. It bugs me when I see a table and the dates look like:

2022-
01-
04

2 Likes