add MonthOfYear, DayOfMonth

This commit is contained in:
Glenn Maynard
2004-02-14 08:27:09 +00:00
parent c0c7c40092
commit d92d1d4127
2 changed files with 20 additions and 0 deletions
+17
View File
@@ -130,6 +130,23 @@ CString SecondsToTime( float fSecs )
return sReturn;
}
int MonthOfYear()
{
const time_t t = time(NULL);
struct tm tm;
localtime_r( &t, &tm );
return tm.tm_mon;
}
int DayOfMonth()
{
const time_t t = time(NULL);
struct tm tm;
localtime_r( &t, &tm );
return tm.tm_mday;
}
CString ssprintf( const char *fmt, ...)
{
va_list va;