So for now, you need to use the deprecated Date class in Java:
import java.util.Date;
.
.
.
Date rightNow= new Date();int hour= rightNow.getHours();
int min=rightNow.getMinutes();
I am still trying to find a better supported way to solve this problem, but for now, deprecated code seems to be the best solution available.
No comments:
Post a Comment