On this screen:
Click Weight Management, enter some pounds to lose and click "calculate now". For the first box on the right, Daily calorie reduction need to accomplish your goal, this is the equation:
Daily_calorie_reduction = total_number_of_days_in_go
al_period / (pounds_to_lose*3500)
The part of my code which accomplishes this is attached, but I keep getting NaN. Is there something obvious I am doing which won't allow this to calculate? Thank you!
var weight2aStartDate=Date.parseExact($('#startdate option:selected').val(), 'M/d/yyyy');
var weight2aBegin=Date.parseExact($('#startdate option:selected').val(), 'M/d/yyyy');
var weight2a=parseInt(days_between(weight2aBegin, weight2aEnd))/(parseInt($('#weight1b'))*3500);