Watchmaker Wiki

The ultimate watch maker for Android Wear!

User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

tips:tomorrow_s_day_of_the_week [2017/01/15 01:53] (current)
slm created
Line 1: Line 1:
 +You can get day name for tomorrow (and and other day after that) by inserting the inserting the following formula into the watch script and calling it when needed
 +     function dwplus(daystring,n) 
 +        local days = 'SunMonTueWedThuFriSat'      
 +        local found = string.find(days, daystring)
 +        local new = 1+((3*n + found-1)%21)
 +        return string.sub(days,new,new+2)
 +     end
 +So, if today is Sunday, dwplus('{ddw2}',1) will return "Mon"
 +Note that this only works in English--you need to change the string days if you are working in another language.
tips/tomorrow_s_day_of_the_week.txt ยท Last modified: 2017/01/15 01:53 by slm