Android Open Source - Geek-Coder-News Utils






From Project

Back to project page Geek-Coder-News.

License

The source code is released under:

MIT License

If you think the Android project Geek-Coder-News 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.geekcoder.util;
/*from   w  w  w . j  a  v  a2 s. c o m*/
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

/**
 * @Author SunnyCoffee
 * @Date 2014-1-28
 * @version 1.0
 * @Desc ????
 */

public class Utils {

  public static String getCurrentTime(String format) {
    Date date = new Date();
    SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.getDefault());
    String currentTime = sdf.format(date);
    return currentTime;
  }

  public static String getCurrentTime() {
    return getCurrentTime("yyyy-MM-dd  HH:mm:ss");
  }
}




Java Source Code List

com.geekcoder.activity.MainActivity.java
com.geekcoder.activity.NewsDetailActivity.java
com.geekcoder.activity.StartActivity.java
com.geekcoder.adapter.ListViewAdapter.java
com.geekcoder.adapter.MyFragmentPagerAdapter.java
com.geekcoder.fragment.TestFragment.java
com.geekcoder.util.Utils.java
com.geekcoder.widget.AutoListView.java