Patch level : 12.0 no-patch

Files correlati     :
Commento            :

Commpletati botime eotime e ok()
This commit is contained in:
Alessandro Bonazzi 2020-06-21 22:06:12 +02:00
parent 4216fd9904
commit 7b398f878d
2 changed files with 5 additions and 7 deletions

View File

@ -541,11 +541,7 @@ bool TDate::isdate(const char* s)
return d <= last_day(m,y);
}
bool TDate::ok() const
{ return _val > 0; }
// @doc EXTERNAL
// @func TDate& | operator + | Incrementa la data di un certo numero di giorni
TDate operator +(
const TDate& a, // @parm Data a cui aggiungere i giorni

View File

@ -8,6 +8,8 @@
#define NULLDATE 0L
#define TODAY -1L
#define BOTIME 0L
#define EOTIME 30001231L
// @doc EXTERNAL
@ -101,8 +103,8 @@ public:
// @cmember Aggiunge degli anni
void addyear(int nyear = 1);
// @cmember Controlla se si tratta di una data corretta
bool ok() const;
// @cmember Controlla se la stringa passata e' una data corretta
bool ok() const { return _val > BOTIME && _val < EOTIME; }
// @cmember Controlla se la stringa passata e' una data corretta
static bool isdate(const char*);
// @cmember Ritorna l'ultimo giorno possibile del mese
@ -296,6 +298,6 @@ const TDate& fnc_max(const TDate& a, const TDate& b);
const char* itom(int month);
const char* itow(int dayofweek);
const TDate botime(0,0,0), eotime(31,12,3000), nulldate(NULLDATE);
const TDate botime(BOTIME), eotime(EOTIME), nulldate(NULLDATE);
#endif // __DATE_H