I recently discovered a form of using a conditional as:
function leftPad(res6) {return (res6 < 10)?'0'+ res6:res6;}
res6 =leftPad(res6);
This is fine inside a function statement. I don't know how to work with this sort of statement on it's own (without a function statement of if there is an appropriate function statement for this string).
Example: I want to have output that compares a date with todays value, if It is after today then use "since", otherwise, use "until". Once I understand how to write this statement I can compare the date values and set a variable to the proper result, to go in my output string.
Thanks