techgaun / ad-bs-converter

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

Conversion Error #2

Closed suman-tms closed 6 years ago

suman-tms commented 7 years ago

When I am trying to convert 2017-07-13 (ie. 2017 July 13) the expected output was

console.log(adbs.ad2bs("1990/8/10"))

day: 29 dayOfWeek:5 month:3 year:2074

but I get day: 30 =>>> this is incorrect dayOfWeek:5 month:3 year:2074

can you please help me

techgaun commented 7 years ago

@sumantimalsina9 thanks for opening the issue. I'm trying to figure out this issue but can't seem to replicate:

const adbs = require('ad-bs-converter')
console.log(adbs.ad2bs('2017/7/13'))
$ node index.js 
{ ne: 
   { year: '२०७४',
     month: '३',
     day: '२९',
     strMonth: 'आषाढ',
     strShortMonth: 'आषा',
     dayOfWeek: '४',
     strDayOfWeek: 'बिहिवार',
     strShortDayOfWeek: 'बिहि',
     strMinDayOfWeek: 'बि' },
  en: 
   { year: 2074,
     month: 3,
     day: 29,
     strMonth: 'Ashadh',
     strShortMonth: 'As',
     dayOfWeek: 4,
     strDayOfWeek: 'Bihibaar',
     strShortDayOfWeek: 'Bihi',
     strMinDayOfWeek: 'Bi' } }

What version of this package are you using?

suman-tms commented 7 years ago

I am using the latest version.

techgaun commented 6 years ago

I can not seem to replicate this with the recently released version as well. Closing for now