Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calendarFunctions doesnot work if value passed as parameter #22

Closed
hackerz12on opened this issue Sep 15, 2019 · 1 comment
Closed

calendarFunctions doesnot work if value passed as parameter #22

hackerz12on opened this issue Sep 15, 2019 · 1 comment

Comments

@hackerz12on
Copy link

hackerz12on commented Sep 15, 2019

I have a value '2019, 9, 17' as ad date, I want to convert this to bs date. The problem is:
if i run console.log(calendarFunctions.getBsDateByAdDate(2019, 9, 17));
It shows correct value but if i write
var cp = '2019, 9, 17 ';
console.log(calendarFunctions.getBsDateByAdDate(cp));
then it says invalid format. What is the issue with this ??

@sanishmaharjan
Copy link
Collaborator

I have a value '2019, 9, 17' as ad date, I want to convert this to bs date. The problem is:
if i run console.log(calendarFunctions.getBsDateByAdDate(2019, 9, 17));
It shows correct value but if i write
var cp = '2019, 9, 17 ';
console.log(calendarFunctions.getBsDateByAdDate(cp));
then it says invalid format. What is the issue with this ??

@hackerz12on getBsDateByAdDate function does not accept date as string. You need to pass three parameters year, month & month-date as:

var year = 2019;
var month = 9;
var date = 17;
console.log(calendarFunctions.getBsDateByAdDate(year, month, date));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants