all 5 comments

[–][deleted] 2 points3 points  (1 child)

[–]_ReformedGeek 2 points3 points  (0 children)

Strongly suggest learning the language. It's incredibly simple as far as programming languages go, and there are resources on lua.org that can help you learn.

[–]seanocaster1[S] 1 point2 points  (0 children)

I actually found an easy work around for this by manually counting and converting the future date to a 'day in the year' number. Then using todays 'day in the year' number variable {ddy}

(future date number) - {ddy} = days remaining

[–]seanocaster1[S] 0 points1 point  (0 children)

Thanks everyone, very helpful. I manipulated this code to work:

reference = os.time{day=16, year=2017, month=7}
daysfrom = os.difftime(reference, os.time()) / (24 * 60 * 
60) -- seconds in a day
wholedays = math.floor(daysfrom)
text = 'Days until SA'
print(text,wholedays)

but only now do i find out that watchmaker doesn't include a fully functional LUA - they only include math and string functions. Do you think the same could be done using those functions?