File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -287,13 +287,19 @@ std::string generate_full_text_report(
287287 for (const auto & [name, itinerary] : itineraries) {
288288 if (itinerary.items .empty ()) continue ;
289289
290+ size_t max_activity_width = 0 ;
291+ for (const auto & item : itinerary.items ) {
292+ max_activity_width = std::max (max_activity_width, item.activity .length ());
293+ }
294+
290295 std::string tz_string = std::string (" UTC" ) + (itinerary.tz_offset >= 0 ? " +" : " " ) + std::to_string (itinerary.tz_offset );
291296 f << " \n Schedule for " << name << " (" << tz_string << " ):\n " ;
292297
293298 for (const auto & item : itinerary.items ) {
294299 double dur = item.end_local .diff_seconds (item.start_local );
295300 f << " " << item.start_local .to_string () << " to " << item.end_local .time_string ()
296- << " (" << DateTime::format_duration ((long long )dur) << " ): " << item.activity << " \n " ;
301+ << " " << std::left << std::setw (max_activity_width) << item.activity
302+ << " (" << DateTime::format_duration ((long long )dur) << " )\n " ;
297303 }
298304 }
299305 return f.str ();
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ namespace jres {
129129
130130 if (parts.empty ()) return " " ;
131131
132- std::string result = " for " ;
132+ std::string result = " " ;
133133 if (parts.size () == 1 ) {
134134 result += parts[0 ];
135135 } else {
You can’t perform that action at this time.
0 commit comments