techgaun / ad-bs-converter

A javascript implementation to convert bikram samvat to anno domini and vice-versa
29 stars 18 forks source link

handle the argument input like NaN.bs2ad('2075/04/00') #6

Open ohmmee opened 6 years ago

ohmmee commented 6 years ago

.bs2ad('2075/04/00') gives out the last month's converted date if possible, handle the way the input is received

like if('2018/02/31') is passed as an argument for ad2bs then, it also gives out result which is absurd because feb cant have 31 days

techgaun commented 4 years ago

Good point. Always good to add additional validations around the input. While I think it would be great to have this, I don't have bandwidth myself to work on this. If I find time, I may try to crack this problem and get it figured. Meanwhile, library/package users should handle that in the current version