javascript - How to determine continuous check-ins based on the last check-in time
ringa_lee
ringa_lee 2017-06-05 11:10:16
0
4
872

Try current time - last check-in time > 60×60×24.
This method always breaks the signature.
So if the last check-in was at 0:00 on the 1st, today is at 23:59 on the 2nd

ringa_lee
ringa_lee

ringa_lee

reply all(4)
Peter_Zhu

When calculating, why not just use the 0-point timestamp for calculation, (strtotime(date('Y-m-d',$time1))-strtotime(date('Y-m-d',$time2)))/(3600 *twenty four).
There is no need to do this. Each person has one record, user ID, last check-in date, and consecutive check-in dates. Determine whether there are several days between today and the last check-in date. If it is the next day, the continuous check-in date +1. If there are several days apart, Day, it will directly become 1.

左手右手慢动作

How about comparing the dates directly...

Although when I sign in now, it is considered a successful sign-in 18-32 hours after the last time. .

我想大声告诉你

You definitely cannot use the time seconds to confirm. For example, if your previous time was 2017-5-30, I can get the second day's time 20170531 through the date() function. Then get and set the day's time format Ymd. Determine whether two are equal

phpcn_u1582
where date(new_date)-date(old_date)=1;
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template