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; /* w w w . ja v a2 s .c o m*/ import java.text.SimpleDateFormat; import java.util.Locale; public class DateFormatFactory { public static SimpleDateFormat getFormat(String format) { SimpleDateFormat dateFormat = new SimpleDateFormat(format, Locale.US); //dateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); return dateFormat; } public static SimpleDateFormat getDateFormat() { return getFormat("dd.MM.yyyy"); } public static SimpleDateFormat getTimeFormat() { return getFormat("HH:mm"); } public static SimpleDateFormat getLongTimeFormat() { return getFormat("HH:mm:ss"); } public static SimpleDateFormat getDateTimeFormat() { return getFormat("dd.MM.yyyy HH:mm"); } public static SimpleDateFormat getLongDateTimeFormat() { return getFormat("dd.MM.yyyy HH:mm:ss"); } }