mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-06-14 14:40:17 +02:00
[APIv2/Timetable] Make swipe refresh download timetable for the selected week
This commit is contained in:
@ -41,6 +41,10 @@ public class Date implements Comparable<Date> {
|
||||
return new Date(this.year, this.month, this.day);
|
||||
}
|
||||
|
||||
public Date getWeekStart() {
|
||||
return clone().stepForward(0, 0, -getWeekDay());
|
||||
}
|
||||
|
||||
public static Date fromYmd(String dateTime) {
|
||||
return new Date(Integer.parseInt(dateTime.substring(0, 4)), Integer.parseInt(dateTime.substring(4, 6)), Integer.parseInt(dateTime.substring(6, 8)));
|
||||
}
|
||||
|
Reference in New Issue
Block a user