Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestamp RegEx #43

Closed
bsboiko opened this issue Sep 11, 2017 · 3 comments
Closed

Timestamp RegEx #43

bsboiko opened this issue Sep 11, 2017 · 3 comments

Comments

@bsboiko
Copy link
Contributor

bsboiko commented Sep 11, 2017

Currently our RegEx matches ISO 8601 timestamps that look like this:

2017-09-05T18:36:37Z

But, the following timestamp without any delimiting characters is also valid:

20170905T183637Z

It seems that the cljs-time library returns ISO 8601 timestamps without the characters and that is failing our RegEx.

@milt
Copy link
Member

milt commented Feb 6, 2018

@bsboiko is this still an issue? We could remove the separator requirement if it is OK with this too

@kelvinqian00
Copy link
Collaborator

kelvinqian00 commented Mar 22, 2021

Can a source be cited for allowing non-colon-separated times? RFC 3339 specifies that hours, minutes, and seconds must be colon-separated in the ABNF:

   date-fullyear   = 4DIGIT
   date-month      = 2DIGIT  ; 01-12
   date-mday       = 2DIGIT  ; 01-28, 01-29, 01-30, 01-31 based on
                             ; month/year
   time-hour       = 2DIGIT  ; 00-23
   time-minute     = 2DIGIT  ; 00-59
   time-second     = 2DIGIT  ; 00-58, 00-59, 00-60 based on leap second
                             ; rules
   time-secfrac    = "." 1*DIGIT
   time-numoffset  = ("+" / "-") time-hour ":" time-minute
   time-offset     = "Z" / time-numoffset

   partial-time    = time-hour ":" time-minute ":" time-second
                     [time-secfrac]
   full-date       = date-fullyear "-" date-month "-" date-mday
   full-time       = partial-time time-offset

   date-time       = full-date "T" full-time

@kelvinqian00
Copy link
Collaborator

Closing this issue as non-colon-separated timestamps are not allowed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants