Back to project page Timetable.
The source code is released under:
GNU General Public License
If you think the Android project Timetable listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.timetable.android.utils; /*from ww w. j a v a 2s.c om*/ import java.util.Calendar; import java.util.Date; public abstract class TimeProvider { /* * Return calendar, set to current time. */ public abstract Calendar getCurrDateTimeCal(); public final Date getCurrDateTime() { return getCurrDateTimeCal().getTime(); } /* * Return calendar, set to current date, time is 00:00; */ public final Calendar getCurrDateCal() { return DateUtils.extractDate(getCurrDateTimeCal()); } public final Date getCurrDate() { return getCurrDateCal().getTime(); } /* * Return calendar, set to current time, date is 01.01.1970; */ public final Calendar getCurrTimeCal() { return DateUtils.extractTime(getCurrDateTimeCal()); } public final Date getCurrTime() { return getCurrTimeCal().getTime(); } }