diff options
Diffstat (limited to 'Minecraft.World/Calendar.cpp')
| -rw-r--r-- | Minecraft.World/Calendar.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Minecraft.World/Calendar.cpp b/Minecraft.World/Calendar.cpp new file mode 100644 index 00000000..e6d8d644 --- /dev/null +++ b/Minecraft.World/Calendar.cpp @@ -0,0 +1,19 @@ +#include "stdafx.h" +#include "Calendar.h" +#include <time.h> + +unsigned int Calendar::GetDayOfMonth() +{ + time_t t = time(0); + struct tm *now = localtime(&t); + + return now->tm_mday; +} + +unsigned int Calendar::GetMonth() +{ + time_t t = time(0); + struct tm *now = localtime(&t); + + return now->tm_mon; +}
\ No newline at end of file |
