X-Git-Url: http://git.pk910.de/?p=DHBWCampusApp.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fde%2Fdhbwloe%2Fcampusapp%2Ffragments%2FDashboardVorlesungsplan.java;h=bb0105d35a1c20f524d1d574b043dbea555ba8ae;hp=e67b364abc7cc9663cd69aa04b36233250c75285;hb=cea4ee15ef92f521ae962404bd1b3c25042219fa;hpb=9a28e7b4c1520f629721693a04b4978fec9692e7 diff --git a/app/src/main/java/de/dhbwloe/campusapp/fragments/DashboardVorlesungsplan.java b/app/src/main/java/de/dhbwloe/campusapp/fragments/DashboardVorlesungsplan.java index e67b364..bb0105d 100644 --- a/app/src/main/java/de/dhbwloe/campusapp/fragments/DashboardVorlesungsplan.java +++ b/app/src/main/java/de/dhbwloe/campusapp/fragments/DashboardVorlesungsplan.java @@ -140,7 +140,7 @@ public class DashboardVorlesungsplan extends CampusAppFragment { Date date; TextView leftCol, rightCol = null; RelativeLayout.LayoutParams params; - SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm"); + SimpleDateFormat dateFormat = new SimpleDateFormat(AppContext.getResString(R.string.timeformat_dashboard_vorlesungsplan_time)); int firstLeftColId = 0; if(events.size() > 0) { @@ -208,13 +208,10 @@ public class DashboardVorlesungsplan extends CampusAppFragment { else if(date1DayId == tomorrowDayId) datetext = AppContext.getResString(R.string.dashboard_calendar_tomorrow); else { - int weekdayResIds[] = new int[] { R.string.week_sunday, R.string.week_monday, R.string.week_tuesday, R.string.week_wednesday, R.string.week_thursday, R.string.week_friday, R.string.week_saturday }; - Calendar cal = Calendar.getInstance(); - cal.setTime(eventDate); - int dow = cal.get(Calendar.DAY_OF_WEEK); - SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM"); + String dayStr = Tools.getWeekdayString(eventDate); + SimpleDateFormat dateFormat = new SimpleDateFormat(AppContext.getResString(R.string.timeformat_dashboard_vorlesungsplan_date)); - datetext = AppContext.getResString(weekdayResIds[dow]) + ", " + dateFormat.format(eventDate); + datetext = dayStr + ", " + dateFormat.format(eventDate); } return datetext; }