feature: added pages for subscription settings feature
This commit is contained in:
parent
3f55f6a629
commit
b183a3b232
27 changed files with 856 additions and 287 deletions
10
client/core/api/apiUtils.cpp
Normal file
10
client/core/api/apiUtils.cpp
Normal file
|
@ -0,0 +1,10 @@
|
|||
#include "apiUtils.h"
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
bool ApiUtils::isSubscriptionExpired(const QString &subscriptionEndDate)
|
||||
{
|
||||
QDateTime now = QDateTime::currentDateTime();
|
||||
QDateTime endDate = QDateTime::fromString(subscriptionEndDate, Qt::ISODateWithMs);
|
||||
return endDate < now;
|
||||
}
|
11
client/core/api/apiUtils.h
Normal file
11
client/core/api/apiUtils.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef APIUTILS_H
|
||||
#define APIUTILS_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace ApiUtils
|
||||
{
|
||||
bool isSubscriptionExpired(const QString &subscriptionEndDate);
|
||||
}
|
||||
|
||||
#endif // APIUTILS_H
|
Loading…
Add table
Add a link
Reference in a new issue