Added Google Firebase

This commit is contained in:
Caesar2011
2018-07-23 00:51:35 +02:00
parent 330d76d7a5
commit 9dde81a63f
5 changed files with 61 additions and 2 deletions

View File

@@ -79,7 +79,7 @@ public class Canteen implements Serializable, Iterable<Day> {
int m = calendar.get(Calendar.MONTH)+1;
int d = calendar.get(Calendar.DAY_OF_MONTH);
return String.format(Locale.getDefault(), "%d-%d-%d", y, m, d);
return String.format(Locale.getDefault(), "%4d-%2d-%2d", y, m, d).replace(' ', '0');
}
public static Calendar keyToCalendar(String dateString) {

View File

@@ -8,7 +8,6 @@ import de.sebse.fuplanner.services.Canteen.types.Day;
public class SortedListDay extends SortedList<Day, Calendar, String> {
@Override
int compare(Day o1, Day o2) {
// TODO correct implementation
return Canteen.calendarToKey(o1.getCalendar()).compareTo(Canteen.calendarToKey(o2.getCalendar()));
}