We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 74458d5 commit dc1705aCopy full SHA for dc1705a
1 file changed
Program.cs
@@ -26,15 +26,18 @@ public static string ToDescription(int time) {
26
if(time >= 60) {
27
int hours = time / 60;
28
if (hours == 1) {
29
- returnDescription = "1 hour ";
+ returnDescription = "1 hr ";
30
}
31
else {
32
- returnDescription = String.Format("{0} hours ", hours);
+ returnDescription = String.Format("{0} hrs ", hours);
33
34
35
int mins = time % 60;
36
- if (mins != 0) {
37
- returnDescription += String.Format("{0} minutes", mins);
+ if(mins == 1) {
+ returnDescription += String.Format("{0} min", mins);
38
+ }
39
+ if (mins > 1) {
40
+ returnDescription += String.Format("{0} mins", mins);
41
42
43
return returnDescription;
0 commit comments