forked from townforge/townforge
cc: add a simpler function to get a date as only a string
This commit is contained in:
parent
11872cbab8
commit
3cda06767b
@ -49,4 +49,12 @@ void get_calendar_date(uint64_t height, std::string *seasonal, uint32_t &day, ui
|
||||
*seasonal = std::to_string(day) + " " + months[month][2] + " " + std::to_string(year);
|
||||
}
|
||||
|
||||
std::string get_calendar_date(uint64_t height)
|
||||
{
|
||||
uint32_t day, month, year;
|
||||
std::string seasonal;
|
||||
get_calendar_date(height, &seasonal, day, month, year);
|
||||
return seasonal;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,5 +17,6 @@ inline T calendar_lerp(const T data[12], uint32_t day, uint32_t month)
|
||||
|
||||
|
||||
void get_calendar_date(uint64_t height, std::string *seasonal, uint32_t &day, uint32_t &month, uint32_t &year);
|
||||
std::string get_calendar_date(uint64_t height);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user