move date helpers into DateTime.cpp
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "DateTime.h"
|
#include "DateTime.h"
|
||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
|
#include "LuaFunctions.h"
|
||||||
|
|
||||||
|
|
||||||
DateTime::DateTime()
|
DateTime::DateTime()
|
||||||
@@ -277,6 +278,14 @@ tm GetDayInYearAndYear( int iDayInYearIndex, int iYear )
|
|||||||
return when;
|
return when;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LuaFunction( MonthOfYear, GetLocalTime().tm_mon+1 );
|
||||||
|
LuaFunction( DayOfMonth, GetLocalTime().tm_mday );
|
||||||
|
LuaFunction( Hour, GetLocalTime().tm_hour );
|
||||||
|
LuaFunction( Minute, GetLocalTime().tm_min );
|
||||||
|
LuaFunction( Second, GetLocalTime().tm_sec );
|
||||||
|
LuaFunction( Year, GetLocalTime().tm_year+1900 );
|
||||||
|
LuaFunction( Weekday, GetLocalTime().tm_wday );
|
||||||
|
LuaFunction( DayOfYear, GetLocalTime().tm_yday );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) 2001-2004 Chris Danford
|
* (c) 2001-2004 Chris Danford
|
||||||
|
|||||||
@@ -417,15 +417,6 @@ LuaFunctionList::LuaFunctionList( CString name_, lua_CFunction func_ )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LuaFunction_NoArgs( MonthOfYear, GetLocalTime().tm_mon+1 );
|
|
||||||
LuaFunction_NoArgs( DayOfMonth, GetLocalTime().tm_mday );
|
|
||||||
LuaFunction_NoArgs( Hour, GetLocalTime().tm_hour );
|
|
||||||
LuaFunction_NoArgs( Minute, GetLocalTime().tm_min );
|
|
||||||
LuaFunction_NoArgs( Second, GetLocalTime().tm_sec );
|
|
||||||
LuaFunction_NoArgs( Year, GetLocalTime().tm_year+1900 );
|
|
||||||
LuaFunction_NoArgs( Weekday, GetLocalTime().tm_wday );
|
|
||||||
LuaFunction_NoArgs( DayOfYear, GetLocalTime().tm_yday );
|
|
||||||
|
|
||||||
static bool Trace( const CString &sString )
|
static bool Trace( const CString &sString )
|
||||||
{
|
{
|
||||||
LOG->Trace( "%s", sString.c_str() );
|
LOG->Trace( "%s", sString.c_str() );
|
||||||
|
|||||||
Reference in New Issue
Block a user