fixed: Config::Text() returned a reference to a local variable (std::string)
added: 'static' directory with *.css and images we have a default layout moved: locale from data to templates notification templates have its own locale object added: reload function reloades locale now too added: 'nice' form of item_info in templates git-svn-id: svn://ttmath.org/publicrep/winix/trunk@582 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -264,6 +264,29 @@ return out.str();
|
||||
}
|
||||
|
||||
|
||||
const char * DateToStr(int year, int month, int day)
|
||||
{
|
||||
static const char * month_letter[] = { "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII" };
|
||||
static char buffer[100];
|
||||
|
||||
--month;
|
||||
|
||||
if( month < 0 )
|
||||
month = 0;
|
||||
|
||||
if( month > 11 )
|
||||
month = 11;
|
||||
|
||||
if( year == 0 )
|
||||
sprintf(buffer, "%s %02d", month_letter[month], day);
|
||||
else
|
||||
sprintf(buffer, "%02d %s %02d", year, month_letter[month], day);
|
||||
|
||||
// warning: not thread safe (we do not use threads)
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
||||
const char * DateToStr(int year, int month, int day, int hour, int min, int sec)
|
||||
{
|
||||
static const char * month_letter[] = { "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII" };
|
||||
|
Reference in New Issue
Block a user