Mark Whitis's Website Home Page Linux Book: Linux Programming Unleashed My Resume Genealogical Data Contact Info Security About

Proper Formats for Dates and Phone Numbers

Date Format

Correct Incorrect

YYYY-MM-DD (prefered)
YYYY-MM-DDTHH:MM:SS (with 24 hour unspecified local time)
YYYY-MM-DDTHH:MM:SS-05 (with 24 hour EST)
YYYY-MM-DDTHH:MM:SSZ (with 24 hour UTC time)
YYYY.MM.DD (not preferred)
YYYY/MM/DD (not preferred)
YYYYMMDD (not preferred)
2003-02-04
2003-02-04T17:30:00
2003-02-04T17:30
2003-02-04T17:30-05
2003-02-04T22:30:00Z
2003.02.04
20030204
2003-2-4
02/04/03
04/02/03
ISO-8601 International Standard Compliant
Unambigous
Y2K compliant
Sortable
Ambiguous
not Y2K Compliant
not sortable

Phone Numbers

Phone numbers are to be expressed in ITU E.123 compliant format: +1-800-555-1212 Where +1 in this example is the country code for the US.
Correct Incorrect
+1-800-555-1212 (prefered) (US)
+1.800.555.1212 (allowed) (US)
+18005551212 (allowed) (US)
+41-22-730-5989 (Switzerland)
800-555-1212
(800) 555-1212
555-1212
+1 800 555 1212 (allowed, but not searchable)
Unambiguous
Sortable
Searchable
ITU E.164
Ambiguous
Not sortable
Not searchable

ITU standards allow for the use of spaces in telephone numbers instead of dashes. I do not condone this practice as it makes it much harder to search for phone numbers, allows for improper word wrapping, and makes phone numbers less identifiable as phone numbers. Computers tend to treat items separated by spaces as separate entities; therefore it is a bad idea to include spaces within a single entitiy such as a phone number.

A telephone number may contain up to 15 digits including the coutry code plus punctuation. Web or screen Forms that separate fields within a phone number are not acceptable; different regions have different organizations. Also, failure to allow non-numeric responses violates the civil rights of people with disabilities including the hearing impaired and those with sleep disabilities; Valid responses might include "No calls", "Deaf", "TDD: +1-800-555-1212", "use email", "Fax: +1-800-555-1212". Some idiots cross check the phone number against the zip code; someone may have a service provider (cell phone, voice mail, answering service, fax gateway, etc) that is not in the same geographic location. Whenever you ask for a phone number, you should also provide a place to list acceptable times to call; otherwise, you are be participating in widespread patterns of discrimination against people with different schedules; such widespread patterns cause small groups of people to suffer the brunt of the stupidity of large groups of people.

Links

This document is maintained by Mark Whitis (whitis@freelabs.com).

Senior Engineer for hire
Software Development - Electronic Design - Embedded Systems - Device Drivers - System/Network Administration and Security - Motor Control, RobotCNC - Linux/Un*x - 25+ years experience
The author of these pages is looking for a new gig.
[RESUME]

Engineers and electronic hobbyists: The new Open Symbol Project is creating open schematic symbols and PCB footprints for a variety of different CAD packages.

Mark Whitis's Website Home Page Linux Book: Linux Programming Unleashed My Resume Genealogical Data Contact Info Security About

All email messages received must pass the turing test or they will be considered SPAM. If it could have been written by a machine, it was.

Under no circumstances are you to email me with questions regarding windoze, any other microsoft operating system or application, or any software which runs under any form of windoze.

*