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
This feature allows us to take input from Devanagari strings such as "२०७८-०१-१८" into the NepaliDate object. The current parse module should handle the Devanagari string so that the NepaliDate object can be initialized from such class.
constnepaliDate=newNepaliDate("२०७८-०१-१८")
The steps for parsing are like below:
The input (can be both English or Devanagari string)
Translate the Devanagari date strings to English strings. Translation includes numbers, months, and months abbrs.
Use the translated English string for parsing.
The text was updated successfully, but these errors were encountered:
@binodnepali, Thanks for sharing your thoughts. We are adding this feature because we already have a method for formatting in Nepali (.formatNepali), and now we need one for parsing it. Other Nepali date tools are also considering or already have this feature.
If we want to keep initialization simple, we could add a static method like parseNepali(...), which acts as the opposite of formatNepali.
This feature allows us to take input from Devanagari strings such as "२०७८-०१-१८" into the NepaliDate object. The current
parse
module should handle the Devanagari string so that theNepaliDate
object can be initialized from such class.The steps for parsing are like below:
The text was updated successfully, but these errors were encountered: