Back to project page StravaFlow.
The source code is released under:
MIT License
If you think the Android project StravaFlow 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 me.mattlogan.stravaflow.util; //from w ww. ja v a 2s. co m import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class DateUtils { public static String formatStravaDate(String stravaDate) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); try { Date date = sdf.parse(stravaDate); DateFormat df = DateFormat.getDateTimeInstance(); return df.format(date); } catch (ParseException e) { e.printStackTrace(); } return null; } }