changed: Date::SerializeDay outputs the date in a form of YYYY-MM-DD (before was: YYYY.MM.DD)

git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@411 e52654a7-88a9-db11-a3e9-0013d4bc506e
master
Tomasz Sowa 11 years ago
parent 5d9ce6e093
commit e25bc826e7

@ -6,7 +6,7 @@ CXX = g++
endif
ifndef CXXFLAGS
CXXFLAGS = -Wall -pedantic -O2 -I/usr/local/include -I.. -L/usr/local/lib
CXXFLAGS = -Wall -O2 -I/usr/local/include -I.. -L/usr/local/lib
endif
export CXX

@ -1,3 +1,3 @@
# DO NOT DELETE
date.o: date.h
# DO NOT DELETE
date.o: date.h

@ -1 +1 @@
o = date.o
o = date.o

@ -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);
}

@ -1,3 +1,3 @@
# DO NOT DELETE
mainparser.o: mainparser.h
# DO NOT DELETE
mainparser.o: mainparser.h

@ -1 +1 @@
o = mainparser.o
o = mainparser.o

@ -1,4 +1,4 @@
# DO NOT DELETE
space.o: space.h ../utf8/utf8.h
spaceparser.o: spaceparser.h space.h ../utf8/utf8.h
# DO NOT DELETE
space.o: space.h ../utf8/utf8.h
spaceparser.o: spaceparser.h space.h ../utf8/utf8.h

@ -1 +1 @@
o = space.o spaceparser.o
o = space.o spaceparser.o

@ -1,3 +1,3 @@
# DO NOT DELETE
utf8.o: utf8.h
# DO NOT DELETE
utf8.o: utf8.h

@ -1 +1 @@
o = utf8.o
o = utf8.o

Loading…
Cancel
Save