BetterDiscord-Animated-Status icon indicating copy to clipboard operation
BetterDiscord-Animated-Status copied to clipboard

SyntaxError: Unexpected token '{' when using clock and text

Open HiddenDeath opened this issue 4 years ago • 5 comments

image what's wrong??

HiddenDeath avatar Oct 28 '21 14:10 HiddenDeath

Thanks for pointing this out. It seems that the github markdown format was changed and the readme is now rendered incorrectly. Paste this into the emoji field:

eval ['🕛','🕐','🕑','🕒','🕓','🕔','🕕','🕖','🕗','🕘','🕙','🕚'][((new Date()).getHours()%12)];

Paste this into the text field:

eval let fmt=t=>(t<10?'0':'')+t;let d=new Date();`${fmt(d.getHours())}:${fmt(d.getMinutes())}:${fmt(d.getSeconds())}`;

toluschr avatar Oct 28 '21 20:10 toluschr

eval ['🕛','🕐','🕑','🕒','🕓','🕔','🕕','🕖','🕗','🕘','🕙','🕚'][((new Date()).getHours()%12)];


How about 12 hour format?

VerySmallfish avatar Oct 29 '21 12:10 VerySmallfish

about 12 hour idk

HiddenDeath avatar Oct 29 '21 15:10 HiddenDeath

Thanks for pointing this out. It seems that the github markdown format was changed and the readme is now rendered incorrectly. Paste this into the emoji field:

eval ['🕛','🕐','🕑','🕒','🕓','🕔','🕕','🕖','🕗','🕘','🕙','🕚'][((new Date()).getHours()%12)];

Paste this into the text field:

eval let fmt=t=>(t<10?'0':'')+t;let d=new Date();`${fmt(d.getHours())}:${fmt(d.getMinutes())}:${fmt(d.getSeconds())}`;

this worked, thanks <3

HiddenDeath avatar Oct 29 '21 15:10 HiddenDeath

For 12 hour: eval let fmt=t=>(t<10?'0':'')+t;let d=new Date();`${fmt(d.getHours()%12)}:${fmt(d.getMinutes())} ${d.getHours()>12?'PM':'AM'}`;

stressatoo avatar Apr 12 '22 11:04 stressatoo