Android Open Source - Timetable Date Format Factory






From Project

Back to project page Timetable.

License

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.

Java Source Code

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");
  }
  
}




Java Source Code List

com.timetable.android.AlarmSoundPreference.java
com.timetable.android.BroadcastActions.java
com.timetable.android.DeviceMuteService.java
com.timetable.android.EventBroadcastSender.java
com.timetable.android.EventChecker.java
com.timetable.android.EventController.java
com.timetable.android.EventPager.java
com.timetable.android.EventPeriod.java
com.timetable.android.EventService.java
com.timetable.android.EventViewProvider.java
com.timetable.android.EventView.java
com.timetable.android.Event.java
com.timetable.android.IllegalEventDataException.java
com.timetable.android.Logger.java
com.timetable.android.ServiceStarter.java
com.timetable.android.TimetableApp.java
com.timetable.android.TimetableDatabase.java
com.timetable.android.activities.EventAddActivity.java
com.timetable.android.activities.EventCopyActivity.java
com.timetable.android.activities.EventDayViewActivity.java
com.timetable.android.activities.EventEditActivity.java
com.timetable.android.activities.SettingsActivity.java
com.timetable.android.alarm.AlarmDialogActivity.java
com.timetable.android.alarm.AlarmService.java
com.timetable.android.alarm.EventAlarm.java
com.timetable.android.uitests.AlarmDialogActivityTestCase.java
com.timetable.android.uitests.EventAddActivityTestCase.java
com.timetable.android.uitests.TimetableUiTestCase.java
com.timetable.android.utils.DateFormatFactory.java
com.timetable.android.utils.DateUtils.java
com.timetable.android.utils.FakeTimeProvider.java
com.timetable.android.utils.SimpleTimeProvider.java
com.timetable.android.utils.TestAlarmStarter.java
com.timetable.android.utils.TimeProvider.java
com.timetable.android.utils.Utils.java