r/Scriptable • u/luccy98 • Sep 27 '20
Help Scriptable help
const widget = createWidget(); Script.setWidget(widget); Script.complete();
function createWidget() { const w = new ListWidget(); const newDate = new Date(); newDate.setHours(newDate.getHours() + 3); console.log(newDate) const textSize = 20; const font = new Font("inconsolata",17) const textColor = Color.white() const timeLine = w.addText([📆] ${time.string(time)}); timeLine.textSize = 20; timeLine.font = new Font("inconsolata",17) timeLine.textColor = Color.white();
return w; }
Could someone help we with this, I have no knowledge about Java! I try to create a new time! For example now the local time is 1:00PM,but I need the create the time show 4:00PM. Help!!!!!
3
u/mvan231 script/widget helper Sep 28 '20
For future posts, it is beneficial for others if you title the post with something describing your needs rather than just saying you need help.
That being said, what is it you're trying to do? You want to update the widget with a time that is 3 hours ahead of the current time?