Back to project page rss-parser.
The source code is released under:
Copyright (c) 2014 Artem Gapchenko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the So...
If you think the Android project rss-parser 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 aga.rssparser; //from w w w. j av a2 s .com import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; /** * @author artem * Created on 17.08.14. */ public class Utils { private static final SimpleDateFormat RFC_822_FORMATTER = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z"); public static String capitalize(final String arg) { if (arg == null || arg.isEmpty()) { return arg; } else { return Character.toUpperCase(arg.charAt(0)) + arg.substring(1); } } public static Date toDate(final String value) { try { return RFC_822_FORMATTER.parse(value); } catch (ParseException e) { return new Date(); } } }