You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems the popular german date format of {dd}.{mm}.{yy} causing inconsistent results. Validated with Chrome on the Sugar.js date demo homepage in the console.
Replicate by typing this into the console
Sugar.Date.create('29.04.16') -> current date
Sugar.Date.create('29.04.16', 'de') -> current date (wrong)
Sugar.Date.create('29.04.2016', 'de') -> right date
Sugar.Date.create('29.04.16', 'de') -> same code as before, right date now
The text was updated successfully, but these errors were encountered:
@thomasf1 I've confirmed the results you're getting. Also the first date is also wrong... it's not quite the current date, but a few hours ahead. There also appears to be some kind of state being kept. This shouldn't happen, maybe there's something deeper here, but I'll definitely look into it, thanks!
@Costegillio I think @thomasf1's comment is about out-of-the-box date parsing, so he's probably not using addFormat... this seems to be some kind of bug instead.
This has taken ages, but I put in a fix. In the end Finnish date parsing allows periods as time marker separators and the standalone time format was interfering with date parsing. I've added code to make the dots in times exclusive to the Finnish locale.
It seems the popular german date format of {dd}.{mm}.{yy} causing inconsistent results. Validated with Chrome on the Sugar.js date demo homepage in the console.
Replicate by typing this into the console
Sugar.Date.create('29.04.16') -> current date
Sugar.Date.create('29.04.16', 'de') -> current date (wrong)
Sugar.Date.create('29.04.2016', 'de') -> right date
Sugar.Date.create('29.04.16', 'de') -> same code as before, right date now
The text was updated successfully, but these errors were encountered: