package de.tblsoft.solr.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtils {
	
	public static String DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ssZ";
	
	String date2String(Date date) {

		SimpleDateFormat sdfPipeline = new SimpleDateFormat(
				"yyyy-MM-dd'T'HH:mm:ssZ");
		return sdfPipeline.format(date);

	}
	
	public static Date getDate(String date) {
		SimpleDateFormat sdfPipeline = new SimpleDateFormat(
				"yyyy-MM-dd'T'HH:mm:ssZ");
		try {
			return sdfPipeline.parse(date);
		} catch (ParseException e) {
			throw new RuntimeException(e);
		}
		
	}

}

@@ -208,16 +208,30 @@
 sZ%22;%0A%09%0A%09
+public static 
 String d
@@ -254,17 +254,16 @@
 date) %7B%0A
-%0A
 %09%09Simple
@@ -471,32 +471,32 @@
 mpleDateFormat(%0A
-
 %09%09%09%09%22yyyy-MM-dd'
@@ -622,16 +622,430 @@
 e);%0A%09%09%7D%0A
+%09%7D%0A%09%0A%09public static String date2String(Date date, String format) %7B%0A%09%09SimpleDateFormat sdfPipeline = new SimpleDateFormat(%0A%09%09%09%09format);%0A%09%09return sdfPipeline.format(date);%0A%0A%09%7D%0A%09%0A%09public static Date getDate(String date, String format) %7B%0A%09%09SimpleDateFormat sdfPipeline = new SimpleDateFormat(%0A%09%09%09%09format);%0A%09%09try %7B%0A%09%09%09return sdfPipeline.parse(date);%0A%09%09%7D catch (ParseException e) %7B%0A%09%09%09throw new RuntimeException(e);%0A%09%09%7D%0A
 %09%09%0A%09%7D%0A%0A%7D

add date util methods