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
{{ message }}
This repository has been archived by the owner on May 21, 2019. It is now read-only.
In this first text box is the sample Chinese time format,
Second one is verifying time in English time format
Third is verifying time in Chinese time format, which returns undefined
@tkarthick81 I realised there is a small bug that needs fixing. But one issue with your code is that you're trying to use a locale that hasn't been loaded when you called the $dateParser() method. It takes some time to load and the best thing to do here is to simply load the locale file up front.
Another thing to consider is that $dateParser will use whatever locale is currently set within the scope it's loaded in. So trying to use the 'en' locale when you've already loaded the 'zh-cn' locale will return undefined simply because the 'shortTime' format for 'zh-cn' doesn't match the one for 'en'.
timeString : 上午12:00
on calling the below line with the time return invalid time
$dateParser(timeString, 'shortTime')
The text was updated successfully, but these errors were encountered: