Code example for ParsePosition

Methods: setIndex

0
	private static final ParsePosition PARSE_POSITION = new ParsePosition(0);
 
	public static Date parseDoubanDate(final String text) {
		Date date = null;
		if (!TextUtils.isEmpty(text)) {
			PARSE_POSITION.setIndex(0);
			date = DATE_FORMAT_DOUBAN.parse(text, PARSE_POSITION);
		} 
		return date;
	} 
 
} 
Experience pair programming with AI  Get Codota for Java