Jump to the post that solved this thread.
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 11 Years ago Cnditional seconds
#1
Solved: 11 Years ago
I am using a timeonline conventional and I need to check time online. Days 1, 5, 10, 50, 100, 500, day is in seconds.
What proper format is used for let say 500 days?

I am referring to template conditionals!!!!

<if $something >= 43200000 then>500 days online time</if>
#2
Solved: 11 Years ago
Well, as I said earlier, it's just simple maths.

60*60*24 = 86400 -> 1 day
60*60*24*5 = 432000 -> 5 days
60*60*24*50 = 4320000 -> 50 days
60*60*24*100 = 8640000 -> 100 days
etc.
#3
Solved: 11 Years ago
D666 thanks man but how do I integrate your answer into template conditional expression?
<if $something >= 43200000 then>500 days online time</if>
#4
Solved: 11 Years ago
That depends what and where you want to check. $something has to be time in seconds too. For example this will check if current user registered in 2014:
<if $mybb->user['regdate'] > 1388534400 then>You registered in 2014.</if>
#5
Solved: 11 Years ago
Thanks man very much!
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)