Dates
Dates
AGGGGHHGGHG!?!?
Dates
AGGGGHHGGHG!?!?
      - A short talk about how writing
        regexes turns me into rageguy
Date formats
Date formats

•   There are so many of them!
Date formats

•There are so many of them!
• Why do people keep inventing
 them?
Date formats

•There are so many of them!
• Why do people keep inventing
 them?
• I hate writing regexes
ISO8601

2012-06-28T
 00:15:46Z
ISO8601

 2012-06-28T
00:15:46+00:00
ISO8601

2012-06-28T
00:15:46.456
   +00:00
/^(d{4})-(d{2})-
   (d{2})T(d{2}):
 (d{2}):(d{2})(?:(?:
.|,)(d+))?((?:+|-)d
       d:dd)$/
ISO8601 is
 comparatively
EASY to parse.
ISO8601 is
standard, there are
     libraries.
HTTP


Mon, 20 Dec 1998
 01:00:00 GMT
HTTP



 :(
Apache


[27/Jun/2012:23:57:03
       +0000]
Apache
ElasticSearch


 [2012-06-26
02:08:26,879]
ElasticSearch
RabbitMQ


26-Jun-2012::16:18:30
RabbitMQ
MongoDB


Thu Jun 28 01:02:29
MongoDB
Syslog



Jun 28 00:17:26
Syslog
.Net ‘tick’
634763158360000000

  100 ns from 1st Jan 1AD
(Except those that are from 3rd Jan)
.Net ‘tick’
MySQL



120423 12:31:04
MySQL
Please don’t make me
write more regexes?
STOP INVENTING
 DATE FORMATS
Thanks!

Dates aghhhh!!?!?!?!