Commit 7bc2dc0c by Tuomas Riihimäki

VITTUPERKELEEN java.util.Calendar.after(Object o) kun o = new Date()

1 parent 8f71ece1
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
package fi.codecrew.moya.model; package fi.codecrew.moya.model;
import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -120,13 +119,13 @@ public class Compo extends GenericEntity { ...@@ -120,13 +119,13 @@ public class Compo extends GenericEntity {
public boolean isSubmit() public boolean isSubmit()
{ {
Calendar now = Calendar.getInstance(); Date now = new Date();
return now.after(getSubmitStart()) && now.before(getSubmitEnd()); return now.after(getSubmitStart()) && now.before(getSubmitEnd());
} }
public boolean isVote() public boolean isVote()
{ {
Calendar now = Calendar.getInstance(); Date now = new Date();
return !getHoldVoting() && return !getHoldVoting() &&
now.after(getVoteStart()) && now.after(getVoteStart()) &&
now.before(getVoteEnd()); now.before(getVoteEnd());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!