cc: add a simpler function to get a date as only a string

This commit is contained in:
Crypto City 2021-08-20 13:02:17 +00:00
parent 11872cbab8
commit 3cda06767b
2 changed files with 9 additions and 0 deletions

View File

@ -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;
}
}

View File

@ -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);
}