mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-05 21:57:20 +00:00
Add some separators for session date and time
From: https://community.aseprite.org/t/2276
This commit is contained in:
parent
c1b61fedbf
commit
865e0d7ee6
@ -65,6 +65,14 @@ std::string Session::name() const
|
||||
base::split_string(name, parts, "-");
|
||||
|
||||
if (parts.size() == 3) {
|
||||
if (parts[0].size() == 4+2+2) { // YYYYMMDD -> YYYY-MM-DD
|
||||
parts[0].insert(6, 1, '-');
|
||||
parts[0].insert(4, 1, '-');
|
||||
}
|
||||
if (parts[1].size() == 2+2+2) { // HHMMSS -> HH:MM.SS
|
||||
parts[1].insert(4, 1, '.');
|
||||
parts[1].insert(2, 1, ':');
|
||||
}
|
||||
return "Session date: " + parts[0] + " time: " + parts[1] + " (PID " + parts[2] + ")";
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user