Help with (currenttime) variables - How to show day and date, AM and PM?

time
currenttime
timezone

#1

I’m hoping for some extra information to make a (currenttime) variable. I’m in Australia and most of my viewers are in America, so I’m actually a day ahead, and am/pm is often completely flipped. I currently have a Nightbot command which displays the time as “It’s currently 12:16am Saturday 14th” using the code $(time Australia/Melbourne "h:mma dddd Do")

Of course the NB and PB code formatting will be different, so I was wondering if there are day/date/am vs pm and other formatting options for a (currenttime) command? So far I’ve only been able to get it to display in 12 or 24 hour using hh:mm or HH:mm, but can’t even get the “am” or “pm” letters to show up next to the time haha

At the very least, is there a name of the formatting style Phantombot uses so I can search up a resource for myself? That’s the biggest thing I’ve been struggling with in PB, trying to write things on my own but not even knowing what to look up :dizzy_face:


#2

Try default !streamertime command in chat. You can make any alias to it.


#3

Try using this (currenttime Australia/Melbourne, HH:mm:ss a)

This might also help you.

https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html


#4

thank you! the oracle document was the exact kind of resource i was hoping for. i’m bummed there’s no little adjustments like lowercase AM/PM or “nd/st/th” after the date but this is definitely better than nothing.