11#include < xtd/xtd>
22
33auto gen_time_span_from_days (double days) -> void {
4- // Crée un objet TimeSpan et une chaîne TimeSpan à partir
5- // d'un nombre de jours.
4+ // Creates a time_span object and a time_span string from a number of days.
65 auto interval = time_span::from_days (days);
76 auto time_interval = interval.to_string ();
87
9- // Remplit la fin de la chaîne TimeSpan avec des espaces si elle
10- // ne contient pas de millisecondes.
8+ // Fills the end of the time_span string with spaces if it does not contain milliseconds.
119 auto index = time_interval.index_of (' :' );
1210 index = time_interval.index_of (' .' , index);
1311 if (index == string::npos) time_interval += " " ;
@@ -17,11 +15,9 @@ auto gen_time_span_from_days (double days) -> void {
1715
1816auto main () -> int {
1917 console::write_line (" This example of time_span::from_days(double)\n "
20- " generates the following output.\n " );
21- console::write_line (" {0,21}{1,19}" ,
22- " from_days" , " time_span" );
23- console::write_line (" {0,21}{1,19}" ,
24- " ---------" , " ---------" );
18+ " generates the following output.\n " );
19+ console::write_line (" {0,21}{1,19}" , " from_days" , " time_span" );
20+ console::write_line (" {0,21}{1,19}" , " ---------" , " ---------" );
2521
2622 gen_time_span_from_days (0.000000006 );
2723 gen_time_span_from_days (0.000000017 );
0 commit comments