/* * Copyright (c) 1995, 1996 Gunther Schadow. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef PG_DTTYP_H_ #define PG_DTTYP_H_ #include #pragma interface #include #include #include class DTtyp : public Timebase { public: enum { YearMin = 1850, YearMax = 2050, // just a check for plausibility MonthMin = 1, MonthMax = 12, DayMin = 1, DayMax = 31, }; private: int _year; /* year with century */ int _month; /* 1..12 */ int _day; /* 1..31 */ public: DTtyp(); DTtyp(int year, int month, int day); int getYear() const; int getMonth() const; int getDay() const; void setYear(int); void setMonth(int); void setDay(int); void unset(); void nullify(); result input(istream&); void output(ostream&) const; }; #ifndef OUTLINE # include "DTtyp.icc" #endif #endif /* !PG_DTTYP_H_ */