Hi everyone…
This is my first time using time os.date ( )
-- Just a text title = display.newText( sceneGroup, "Date", 0, 0, native.systemFont, 20 ) title.x = display.contentCenterX title.y = 40 title:setFillColor( 1, 1, 1 ) date = os.date() -- returns table of date & time values local function updateTime() title.text = os.date() end Runtime:addEventListener( "enterFrame", updateTime )
I see y my iPad
Thu Apr 2 17:26:05 2015 – and of course the seconds are changing every second…
I have some questions…
1.- How do I do something like this
if myVariableTime == Apr 2 or myVariableTime > Apr 2 then
– nextLevel.isVisible = true
end
So I can type myVariableTime == May 20 and the app will be running and when it counts May 20 the next level will be visible.
Kind of giving coins every 24 hours, something like that.
and also
How do I get the time that the open the app for the first time…
in another variable ,… keep counting time
and then in another say … you have been using this app for 2 months, and 3 days
something like that
I hope is not too much and I really hope someone can helpe me with this, thanks