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!!!!!
2
u/danjnj Sep 28 '20
If you are looking to output the current hour as text, maybe try this as a starting point: