Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Dateparser problems with milliseconds format (sss) #5802

Closed
superole opened this issue Apr 14, 2016 · 4 comments
Closed

Dateparser problems with milliseconds format (sss) #5802

superole opened this issue Apr 14, 2016 · 4 comments

Comments

@superole
Copy link

Bug description:

Dateparser seems to confuse seconds-format with milliseconds-format when they are used together.

Link to minimally-working plunker that reproduces the issue:

http://angular-ui.github.io/bootstrap/#/dateparser

Enter "ss,sss" or "yyyy/MM/dd HH:mm:ss,sss" in the format input-field.
Expected output in result-field is "36,678" and "2016/04/14 13:46:36,678"
Actual output: "ss,s36678" and "2016/04/14 13:46:ss,s36678"

Version of Angular, UIBS, and Bootstrap

Angular:
1.5.3
UIBS:
1.3.1
Bootstrap:
3.3.6

@RobJacobs
Copy link
Contributor

Commas in in the millisecond field are not supported as far as I know:

https://docs.angularjs.org/api/ng/filter/date
http://www.w3.org/TR/NOTE-datetime

@icfantv
Copy link
Contributor

icfantv commented Apr 14, 2016

I don't know that we should be supporting milliseconds at all. This may just be a doc update...

@wesleycho
Copy link
Contributor

We do support milliseconds - this sounds like a bug, but we should investigate a little further.

This is sort of low priority to me though, since it seems pointless to display milliseconds in a datepicker popup with them (although perhaps the user is trying to use the service for something else, which would be fair).

@superole
Copy link
Author

I agree that it may be low priority. I just wanted to let you know about the issue, even if it is a corner-case.

@RobJacobs the issue is not related to the comma. It is easily reproducible without the comma: just choose any string containing two groups of s'es where one of them should represent milliseconds(sss) and the other seconds(s or ss). The angular date-filter supports this just fine(testable from the first link you presented).

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

No branches or pull requests

5 participants