Menu

#2 Incorrect format issue

open
nobody
None
5
2010-09-23
2010-09-23
Anonymous
No

tracked it down to I believe this line:

var res = format.split(/(dddd|ddd|dd|d|fff|ff|f|hh|h|HH|H||mm|m|MMMM|MMM|MM|M|ss|s|tt|t|yyyy|yyy|yy|y)?/);

which when parsing the time format of "MM/dd/yyyy HH:mm:ss" gets split by every letter and misses a couple. I don't know enough about how format.split works here to fix it myself. Point being is the output is incorrect as a result.

the res array looks like {M,M,/,/,y,y,y,y,_,,:,m,m,:,s,s} the underscore is meant to be a space.

I presume it should look like {MM,/,dd,/,yyyy,_,HH,:,mm,:,ss}

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.