added: to Date:

template<class Stream> void SerializeMonthDay(Stream & out) const;
       template<class Stream> void SerializeHourMin(Stream & out) const;




git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@417 e52654a7-88a9-db11-a3e9-0013d4bc506e
master
Tomasz Sowa 11 years ago
parent d77db196ee
commit 39a1ea1007

@ -266,6 +266,20 @@ public:
void SerializeHourMinSec(Stream & out) const;
/*
this method outputs to the given stream: MM-DD, eg. 02-12 (02 month, 12 day)
*/
template<class Stream>
void SerializeMonthDay(Stream & out) const;
/*
this method outputs to the given stream: HH:MM, eg: 13:05
*/
template<class Stream>
void SerializeHourMin(Stream & out) const;
/*
this method outputs to the given stream: YYYY-MM-DD HH:MM:SS, eg: 1990-02-12 13:05:39
ISO 8601 format
@ -527,6 +541,24 @@ void Date::SerializeHourMinSec(Stream & out) const
}
template<class Stream>
void Date::SerializeMonthDay(Stream & out) const
{
SerializeInt(out, month);
out << '-';
SerializeInt(out, day);
}
template<class Stream>
void Date::SerializeHourMin(Stream & out) const
{
SerializeInt(out, hour);
out << ':';
SerializeInt(out, min);
}
template<class Stream>
void Date::Serialize(Stream & out) const
{

Loading…
Cancel
Save