[solved] Playing with time
-
wrote on 30 Mar 2011, 08:19 last edited by
Hi,
I haven't seen any function to play with time, i wonder if is it possible. What i'm looking for is some funtions like that :
@if(time1.isbefore(time2)) ...
var intVar = time1.secTo(time2) ....@In a same way is there any function for handling string like find, substr or charAt ? It would prevent me from reinventing the wheel and creating a C++ extension for so few. Or at least, is it possible to create a library of functions accessible from javascript without creating QML object? Because as far as I understood it we can only register qml type.
Thanks in advance.
-
wrote on 30 Mar 2011, 13:07 last edited by
It's just standard EcmaScript. All standard objects are available. Take look at the "Mozilla Reference":http://developer.mozilla.org/en/JavaScript/Reference . For instance @(new Date()).getTime())@ delivers the number of miliseconds since begin of Epoch.
-
wrote on 31 Mar 2011, 12:31 last edited by
Thanks a lot. That would be great if this information was on the doc.
1/3