ja acabei
This commit is contained in:
@@ -158,7 +158,7 @@ public class MedicationDialog extends DialogFragment {
|
||||
builder.setTitle("Adicionar Medicamento");
|
||||
// Default time to current time
|
||||
Calendar cal = Calendar.getInstance();
|
||||
String defaultTime = String.format(Locale.getDefault(), "%02d:%02d", cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));
|
||||
String defaultTime = String.format(Locale.US, "%02d:%02d", cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));
|
||||
selectedTimes.add(defaultTime);
|
||||
refreshTimeChips();
|
||||
}
|
||||
@@ -272,7 +272,7 @@ public class MedicationDialog extends DialogFragment {
|
||||
|
||||
TimePickerDialog timePickerDialog = new TimePickerDialog(getContext(),
|
||||
(view, hourOfDay, minute1) -> {
|
||||
String time = String.format(Locale.getDefault(), "%02d:%02d", hourOfDay, minute1);
|
||||
String time = String.format(Locale.US, "%02d:%02d", hourOfDay, minute1);
|
||||
if (!selectedTimes.contains(time)) {
|
||||
selectedTimes.add(time);
|
||||
Collections.sort(selectedTimes);
|
||||
|
||||
@@ -84,7 +84,7 @@ public class ScheduleViewModel extends AndroidViewModel {
|
||||
}
|
||||
|
||||
public void setDate(int year, int month, int dayOfMonth) {
|
||||
String date = String.format("%02d/%02d/%04d", dayOfMonth, month + 1, year);
|
||||
String date = String.format(java.util.Locale.US, "%02d/%02d/%04d", dayOfMonth, month + 1, year);
|
||||
selectedDate.setValue(date);
|
||||
loadTimeSlots(date);
|
||||
}
|
||||
@@ -216,7 +216,7 @@ public class ScheduleViewModel extends AndroidViewModel {
|
||||
boolean isToday = false;
|
||||
|
||||
if (selectedDateStr != null) {
|
||||
String todayStr = String.format("%02d/%02d/%04d",
|
||||
String todayStr = String.format(java.util.Locale.US, "%02d/%02d/%04d",
|
||||
now.get(Calendar.DAY_OF_MONTH),
|
||||
now.get(Calendar.MONTH) + 1,
|
||||
now.get(Calendar.YEAR));
|
||||
@@ -250,7 +250,7 @@ public class ScheduleViewModel extends AndroidViewModel {
|
||||
continue;
|
||||
}
|
||||
|
||||
String timeStr = String.format("%02d:%02d", h, m);
|
||||
String timeStr = String.format(java.util.Locale.US, "%02d:%02d", h, m);
|
||||
|
||||
if (!isToday || h > currentHour || (h == currentHour && m > currentMinute)) {
|
||||
addSlot(slots, timeStr, bookedTimes);
|
||||
|
||||
Reference in New Issue
Block a user