1

All numeric dates can be separated with slashes (/), hyphens (-) or dots (.). Which of these would you say is best to use for writing dates as well as displays on your product?

Slashes (2023/01/11)

Pros:

  • Most frequently used
  • More familiar

Cons:

  • Can't be used in file names
  • Could be confused with "1" or "7" in handwritten dates.
  • Can look cluttered and less legible

Hyphens (2023-01-11)

Pros:

  • More legible and looks cleaner
  • Can be used in file names
  • Clear in handwritten dates

Cons:

  • Less commonly used than slashes
  • Can be confusing, especially with multiple days (ie. 11-15 Jan)

Dots (2023.01.11)

Pros:

  • More compact than other separators
  • Can add different style to a document
  • Used by some countries
  • No confusion between numbers in handwriting

Cons:

  • Can be mixed up with decimal or other numbers
  • Much less common than slashes or hyphens
  • Use in file names could be confusing

Considering the above, what separator would you say is best to use for everyday use? Also, what are some other advantages and disadvantages of using the selected separator?

3
  • 1
    What specific context are you considerimg this for? Jan 11 at 7:35
  • 1
    Check with your users - they will have all sorts of cultural and contextual biases that we can't guess Jan 11 at 10:10
  • 1
    I use and promote the use of hyphens myself. Mostly because it's the ideal for filenames (even though periods are valid, they can be mistaken for extensions) and fairly standard in common timestamp formats in datetime libraries. I also find that since American date-writing often uses slashes, the day/month ambiguity is worse. With hyphens and periods it's more typically understood to go in descending order. Jan 11 at 14:19

1 Answer 1

1

Most platforms provide support for regional date/time/number formats.

Date formats vary based on the language and cultural norms.

A user on a system can usually choose alternative representation based on their preference.

Best practice is to honor the user selected preference or system default.

No matter which variant you choose based on your criteria you will find some cases where over-riding the user selection is not welcome or advised.

Your programming environment and operating system work together to support the user preference, for example by enabling such services with a function call to set the "locale" or time zone. Additionally you will call functions that participate in this cooperative effort by using parameters and arguments such as 'display a date' or display a short date, or display a regionally formatted 'date and time' or a monetary amount with a currency indicator.

1
  • Additional to the above, be aware that regional date/time/number preference is separate from language preference. Region is partially about input methods (eg whether there's a . or a , on the numpad), while language is mostly about reading and understanding the UI. 2 days ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.