[Plugin] System date and time

Post your completed addons to share with the community

Post » Wed Oct 12, 2011 5:18 am

Document, plugin and sample capx are included.


time away L plugin, Get elapsed interval of turned off game from local storage.

time away plugin, Get elapsed interval of turned off game from webstroage.

date in a row plugin, Get continuous date count.
Last edited by rexrainbow on Sun May 24, 2015 9:12 am, edited 5 times in total.
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

Post » Wed Oct 12, 2011 7:15 am

great!
B
12
S
5
G
5
Posts: 80
Reputation: 3,572

Post » Wed Oct 12, 2011 12:37 pm

Nice work! Simple but useful.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Thu Oct 13, 2011 8:09 pm

Hi,

Nice.

Typo?

In dialog:

"Parameters for Date: Start timer
The naem of timer."

should that be:

"The name of timer."

Thanks.
B
11
S
2
G
5
Posts: 2
Reputation: 3,570

Post » Thu Oct 13, 2011 11:33 pm

Thanks, I had fix it and updated.
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

Post » Fri Nov 11, 2011 5:57 pm

hi, the link is dead, can you fix it please
thx
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Sat Nov 12, 2011 1:04 am

Sorry, I fix it.

I had change my plugin-id, see this post.
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

Post » Tue Feb 14, 2012 8:46 pm

is there an example somewhere of how to setup and use the date plugin?
B
6
S
2
G
4
Posts: 12
Reputation: 2,810

Post » Wed Feb 15, 2012 9:16 pm

a let myself to add a little tweak needed for relative time, unixtimestamp:

in edittime:

[code]AddExpression(10, ef_return_number, "Get current unix timestamp", "Date", "UnixTimestamp", "Get current number of milliseconds since the epoch.");[/code]

in runtime:
[code]     exps.UnixTimestamp = function (ret)
     {
         var today = new Date();
          ret.set_int(today.getTime());
     };[/code]

great plugin, @rexrainbow maybe you could add this to the official release! cheers!
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Thu Feb 16, 2012 4:11 am

@ranma

"Expression: Get current ticks" is doing the same thing.
"Get current ticks of timer in milliseconds. (Date.getTime())"

[code]exps.CurTicks = function (ret)
{
    var timer = new Date();
    ret.set_int(timer.getTime());
};[/code]

Maybe I should rename this expression?
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests