diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2009-08-31 22:40:57 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2009-08-31 22:40:57 +0000 |
| commit | 6d6cca7830ed931198cd2df77bafbdd81038171a (patch) | |
| tree | 0ebe21bca4f6a65e78ad9971bdc513c8222e5bfa /src/tests | |
| parent | 6e7f15f8157499796689a2bff1d110e83104ef43 (diff) | |
| download | libbu++-6d6cca7830ed931198cd2df77bafbdd81038171a.tar.gz libbu++-6d6cca7830ed931198cd2df77bafbdd81038171a.tar.bz2 libbu++-6d6cca7830ed931198cd2df77bafbdd81038171a.tar.xz libbu++-6d6cca7830ed931198cd2df77bafbdd81038171a.zip | |
Added a getDaysInMonth function, it'll live in util.{cpp,h} until I create an
actual Date class.
Diffstat (limited to '')
| -rw-r--r-- | src/tests/daysinmonth.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
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 @@ | |||
| 1 | #include "bu/sio.h" | ||
| 2 | #include "bu/util.h" | ||
| 3 | |||
| 4 | using namespace Bu; | ||
| 5 | |||
| 6 | int main() | ||
| 7 | { | ||
| 8 | for( int j = 0; j < 12; j++ ) | ||
| 9 | { | ||
| 10 | sio << "2012-" << j << " = " | ||
| 11 | << getDaysInMonth( j, 2012 ) << sio.nl; | ||
| 12 | } | ||
| 13 | |||
| 14 | return 0; | ||
| 15 | } | ||
| 16 | |||
