Skip to content

Commit

Permalink
Change format to conform to strftime() rather than date()
Browse files Browse the repository at this point in the history
  • Loading branch information
hgtonight committed Jun 26, 2013
1 parent d62ce1f commit 3a8a727
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions applications/dashboard/models/class.usermodel.php
Expand Up @@ -2495,13 +2495,13 @@ public function GetInvitationCount($UserID) {
->FirstRow();

// If CountInvitations is null (ie. never been set before) or it is a new month since the DateSetInvitations
if ($User->CountInvitations == '' || is_null($User->DateSetInvitations) || Gdn_Format::Date($User->DateSetInvitations, 'n Y') != Gdn_Format::Date('', 'n Y')) {
if ($User->CountInvitations == '' || is_null($User->DateSetInvitations) || Gdn_Format::Date($User->DateSetInvitations, '%m %Y') != Gdn_Format::Date('', '%m %Y')) {
// Reset CountInvitations and DateSetInvitations
$this->SQL->Put(
$this->Name,
array(
'CountInvitations' => $InviteCount,
'DateSetInvitations' => Gdn_Format::Date('', 'Y-m-01') // The first day of this month
'DateSetInvitations' => Gdn_Format::Date('', '%Y-%m-01') // The first day of this month
),
array('UserID' => $UserID)
);
Expand Down

0 comments on commit 3a8a727

Please sign in to comment.