Time fix
This commit is contained in:
parent
fadf2f309c
commit
6ba49cecad
@ -89,4 +89,13 @@ public class Groups {
|
||||
public void setCourseId(Course courseId) {
|
||||
this.courseId = courseId;
|
||||
}
|
||||
|
||||
public String getTimeString() {
|
||||
int minutes = this.getTime() % 60;
|
||||
String minutesString = Integer.toString(minutes);
|
||||
if (minutes < 10) {
|
||||
minutesString = "0" + minutesString;
|
||||
}
|
||||
return String.format("%o.%s", this.getTime() / 60, minutesString);
|
||||
}
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
package com.plannaplan.controllers;
|
||||
|
||||
import java.security.acl.Group;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Dictionary;
|
||||
import java.util.Hashtable;
|
||||
@ -32,7 +31,7 @@ public class GroupController {
|
||||
Dictionary<String, Object> group = new Hashtable<>();
|
||||
group.put("id", g.getId());
|
||||
group.put("day", g.getDay().label + 1);
|
||||
group.put("time", String.format("%o.%o", g.getTime() / 60, g.getTime() % 60));
|
||||
group.put("time", g.getTimeString());
|
||||
group.put("lecturer", g.getLecturer().toString());
|
||||
group.put("room", g.getRoom());
|
||||
group.put("capacity", g.getCapacity());
|
||||
|
Loading…
Reference in New Issue
Block a user