From 6d6cca7830ed931198cd2df77bafbdd81038171a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 31 Aug 2009 22:40:57 +0000 Subject: Added a getDaysInMonth function, it'll live in util.{cpp,h} until I create an actual Date class. --- src/tests/daysinmonth.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/tests/daysinmonth.cpp (limited to 'src/tests') diff --git a/src/tests/daysinmonth.cpp b/src/tests/daysinmonth.cpp new file mode 100644 index 0000000..9888844 --- /dev/null +++ b/src/tests/daysinmonth.cpp @@ -0,0 +1,16 @@ +#include "bu/sio.h" +#include "bu/util.h" + +using namespace Bu; + +int main() +{ + for( int j = 0; j < 12; j++ ) + { + sio << "2012-" << j << " = " + << getDaysInMonth( j, 2012 ) << sio.nl; + } + + return 0; +} + -- cgit v1.2.3