Btw, i was trying to implement the same function but i'm getting a hard time understanding how the ST language works. Is the any ST language documentation besides the one on help?
For example i'm having a issue (probably related to includes) where i'm trying to use Lib.Core.V1_0.B99_PCTimeNode.Wday and i get the message the variable 'Wday' can't be accessed from the current scope.
Thanks