I just want to say thanks for posting this, and for structuring and documenting it so beautifully — I feel like am learning more Javascript reading through this than I have in all my fumbling about with StackOverflow etc. for the last few months.
Edit: I mean, this line alone is worth a beer — I can think of all kinds of applications for it.
That is wonderful to hear. I am definitely learning as I go as well – one reason I document so heavily is to make sure I understand what’s going on. Also, Javascript is just such a fun and expressive language too.
And trust me that line of code came at the end of hours of strife trying to figure out some bugs!
It looks amazing. I tried to put it in my phone (iphone 7) and found the space is not enough if there are 3 events shows on the medium widge.But thanks for your great notes in the code, I modified according it and got a perfect result.
Thank you. So it looks like the parameter you passed into createRelativeTime - namely date - is null. In this case there’s something wrong with eventDate - which gets created in line 16. Possibly because you create it with no parameters i.e. no date.
Hi, recent lurker and Scriptable newbie here. I just published a little “chat” widget for Scriptable. You can quickly start a conversation with a predefined list of contacts through SMS, Call, FaceTime + Audio, and WhatsApp. Thought some of you might find it useful.