mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-12-01 14:20:11 +01:00
2025-10-23 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'RDCart::updateLength()' that could cause patently ridiculous values to be calculated for the 'Start' and 'End' date-time columns in the cart library. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -25061,3 +25061,7 @@
|
|||||||
2025-10-13 Fred Gleason <fredg@paravelsystems.com>
|
2025-10-13 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Incremented the package version to 4.4.1.
|
* Incremented the package version to 4.4.1.
|
||||||
* Incremented the Python API version to 4.4.1.
|
* Incremented the Python API version to 4.4.1.
|
||||||
|
2025-10-23 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Fixed a bug in 'RDCart::updateLength()' that could cause patently
|
||||||
|
ridiculous values to be calculated for the 'Start' and 'End'
|
||||||
|
date-time columns in the cart library.
|
||||||
|
|||||||
@@ -50,11 +50,16 @@ QString RDCheckDateTime(QDateTime const &datetime, QString const &format)
|
|||||||
{
|
{
|
||||||
QString checkedValue = "NULL";
|
QString checkedValue = "NULL";
|
||||||
|
|
||||||
if(datetime.isValid())
|
if((datetime==RDCheckDateTime_InvalidStart)||
|
||||||
|
(datetime==RDCheckDateTime_InvalidEnd)) {
|
||||||
|
return checkedValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(datetime.isValid()) {
|
||||||
checkedValue = "\"" + datetime.toString(format) + "\"";
|
checkedValue = "\"" + datetime.toString(format) + "\"";
|
||||||
|
}
|
||||||
|
|
||||||
return checkedValue;
|
return checkedValue;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -25,6 +25,16 @@
|
|||||||
#include <qdatetime.h>
|
#include <qdatetime.h>
|
||||||
#include <qstring.h>
|
#include <qstring.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* These are used in conjunction with the code in RDCart::updateLength()
|
||||||
|
* to calculate the outer limits of a disjunctive set of QDateTime values.
|
||||||
|
*
|
||||||
|
* If either of these values are found by RDCheckDateTime(), they will be
|
||||||
|
* returned as a NULL value (meaning, "no limits were found").
|
||||||
|
*/
|
||||||
|
#define RDCheckDateTime_InvalidStart QDateTime(QDate(3000,1,1),QTime(0,0,0))
|
||||||
|
#define RDCheckDateTime_InvalidEnd QDateTime(QDate(1000,1,1),QTime(0,0,0))
|
||||||
|
|
||||||
QString RDCheckDateTime(const QTime &time, const QString &format);
|
QString RDCheckDateTime(const QTime &time, const QString &format);
|
||||||
QString RDCheckDateTime(const QDateTime &datetime, const QString &format);
|
QString RDCheckDateTime(const QDateTime &datetime, const QString &format);
|
||||||
QString RDCheckDateTime(const QDate &date, const QString &format);
|
QString RDCheckDateTime(const QDate &date, const QString &format);
|
||||||
|
|||||||
Reference in New Issue
Block a user