How to make a day of the week/time calculator

Hi everyone! I just started using Articulate Storyline 3, and I was wondering if anyone could help me out. I am trying to make a day of the week/time calculator.

Specifically, I want to be able to input a day of the week (ex: Thursday) and a time (ex: 8 pm) and then have Articulate calculate the day of the week/time 2 hours later, 24 hours later, and 48 hours later.

Example: I input Thursday 8 pm. How do I get Articulate to do the following math?

2 hours later: Thursday 10 pm

24 hours later: Friday 8 pm

48 hours later: Saturday 8 pm

Thanks so much!

4 Replies
Kevin Hayes

That's will be doable with Javascript (I think). 

A few script gurus in the forums might help out, but if you want to have a go yourself you might start here: 

https://www.i-programmer.info/programming/javascript/6322-date-hacks-doing-javascript-date-calculations.html

I have a sneaking suspicion one way might be to calculate the elapsed milliseconds of the start date from the epoch date and then add to that number the milliseconds to get the three times you want and then work back from that (apologies if that's all Greek to you!)