I implemented some pretty self-contained Date improvements like this I need for SC…I think my PR was over five years ago. They weren’t merged in for a long time, then a few years later, when there was interest, unfortunately I didn’t have time to reactivate it and get it back in sync. It looks like others took on the work to get it updated, but then it seems to be still “stalled” for the last few years again. I’d pretty much forgotten about it until now.
I tried various avenues : thisThread.clock.secondsDate.getDate.rawSeconds, etc. But still. If I could get the absolute (unix) second my show starts and the current absolute second I guess I’d be fine. (still having to convert from 1679056364 sec to pretty much today. e.g.: that second was 1 hour, 3 minutes, 35 seconds ago).
@totalgee, wow, is 5 years the average pull-request treatment delay ?
For the record :
I have this setlist generator that creates a Yaml file for a given show that SC digest happily with .parseYAMLFile. Inside there’s how many times I’ve played every song (in total) and for that specific crowd, etc. Many other data inside e.g.: style, tempo, language, devices settings (PVK, BB, Aeros, etc).
Anywho, I have always wanted a gui with a clock to show where I am in my schedule (some gigs are an hours, other 2, etc) So, in my setlist there are many timing data : ExpectedStartTime, ExpectedEndTime, flags like : MustStopBeforeExpectedEndTime = true for specific time rigid gigs. I can actually start the show minutes before or after ExpectedStartTime then automatically set ActualStartTime, etc.
So, basic math with current time vs event time is something I though would be trivial in SC.
Boy do I feel bad. Like I’ve done something so terribly wrong.
I’ve implemented my own point-in-time translator i.e. from an easy to write array [14, 15, 16] representing hours, minutes, seconds (base 24,60,60) of the event converted to "51316" second from midnight. Then, I can do proper math with the current second in the day which is contained in (0..86400).
Boy is this code ugly, unmaintainable, not even 24h+ proof (i.e. a show starting at 23:00 ending 02:00 the next day (e.g.: rave, etc)
Worst than worst, I also have to convert back this second (e.g. 51416) to a digestible [HH:MM:SS] by hand to show something else in my gui than : "Your show starts in 4439 seconds from now".