16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 20:29:17 +02:00

Add conversion from scenario_time to std::string.

This commit is contained in:
Kamil Lewan
2018-07-22 16:46:54 +02:00
parent 9c5e80ceeb
commit ed359d3b4e
3 changed files with 11 additions and 5 deletions

View File

@@ -194,4 +194,10 @@ scenario_time::julian_day() const {
return JD;
}
scenario_time::operator std::string(){
return to_string( m_time.wHour ) + ":"
+ ( m_time.wMinute < 10 ? "0" : "" ) + to_string( m_time.wMinute ) + ":"
+ ( m_time.wSecond < 10 ? "0" : "" ) + to_string( m_time.wSecond );
};
//---------------------------------------------------------------------------