From 94b333ded9eada6c8b79a25c746b1e862059cf75 Mon Sep 17 00:00:00 2001 From: IvanaE Date: Tue, 13 Nov 2018 22:20:01 -0500 Subject: [PATCH] fixed availability time formating --- .../olympusservices/ServiceProviderAvailabilities.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/ServiceProviderAvailabilities.java b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/ServiceProviderAvailabilities.java index 07b0252..d1ea01e 100644 --- a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/ServiceProviderAvailabilities.java +++ b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/ServiceProviderAvailabilities.java @@ -37,7 +37,12 @@ public class ServiceProviderAvailabilities extends AppCompatActivity { @Override public void onTimeSet(TimePicker view, int hourOfDay, int minute) { - button.setText(hourOfDay + ":" + minute); + if (minute==0){ + button.setText(hourOfDay + ":00"); + } + else { + button.setText(hourOfDay + ":" + minute); + } //set availibility for service provider and check start time is less than finish }