2011-11-29, 04:28 PM
Am working over a plugin where a user specifies the number of days (say 2), and it compares with the registration date of users, so you can say that am trying to calculate if the days passed are more than 2 (specified in settings) since when the user registered. For example, if user registered on 22 November, and number of days are specified as 2 (in settings) and if today's date is 25 (> registration date) it does the specified action. Am doing something like:
Oh, and am using below date parser but I don't think it would work in this case when comparing:
$regdate = my_date($mybb->settings['dateformat'],$user['regdate']); (for getting user's registration date)
and
$time = my_date($mybb->settings['dateformat'],$registrationdays); (getting user specified value of days.)
Any help would be appreciated.
If this is done, this would a marvelous invention and a small gift to MyBB from my side.
Thank you.
if($days > $registrationdays)
{
return $somequery;
}
Oh, and am using below date parser but I don't think it would work in this case when comparing:
$regdate = my_date($mybb->settings['dateformat'],$user['regdate']); (for getting user's registration date)
and
$time = my_date($mybb->settings['dateformat'],$registrationdays); (getting user specified value of days.)
Any help would be appreciated.
If this is done, this would a marvelous invention and a small gift to MyBB from my side.
Thank you.