|
|
|
@ -207,25 +207,32 @@ public:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
this method produces: year.month.day, eg. 1990.02.12
|
|
|
|
|
this method outputs to the given stream: YYYY-MM-DD, eg. 1990.02.12
|
|
|
|
|
ISO 8601 format
|
|
|
|
|
*/
|
|
|
|
|
template<class Stream>
|
|
|
|
|
void SerializeDay(Stream & out) const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
this method produces: hour:min:sec, eg: 13:05:39
|
|
|
|
|
this method outputs to the given stream: HH:MM:SS, eg: 13:05:39
|
|
|
|
|
ISO 8601 format
|
|
|
|
|
*/
|
|
|
|
|
template<class Stream>
|
|
|
|
|
void SerializeHour(Stream & out) const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
this method produces: year.month.day our:min:sec, eg: 1990.02.12 13:05:39
|
|
|
|
|
this method outputs to the given stream: YYYY-MM-DD HH:MM:SS, eg: 1990-02-12 13:05:39
|
|
|
|
|
ISO 8601 format
|
|
|
|
|
*/
|
|
|
|
|
template<class Stream>
|
|
|
|
|
void Serialize(Stream & out) const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
the date
|
|
|
|
|
*/
|
|
|
|
|
int year; // 1970 - ...
|
|
|
|
|
int month; // 1 - 12
|
|
|
|
|
int day; // 1 - 31
|
|
|
|
@ -259,9 +266,10 @@ void Date::SerializeInt(Stream & out, int val) const
|
|
|
|
|
template<class Stream>
|
|
|
|
|
void Date::SerializeDay(Stream & out) const
|
|
|
|
|
{
|
|
|
|
|
out << year << '.';
|
|
|
|
|
// !! IMPROVE ME the year should be printed with 4 digits, e.g. 0001 when the year is equal to one
|
|
|
|
|
out << year << '-';
|
|
|
|
|
SerializeInt(out, month);
|
|
|
|
|
out << '.';
|
|
|
|
|
out << '-';
|
|
|
|
|
SerializeInt(out, day);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|