comparison geo-backend/src/main/java/de/intevation/gnv/geobackend/util/DateUtils.java @ 897:02cd2935b5fa

Removed trailing whitespace. geo-backend/trunk@1013 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 28 Apr 2010 07:04:19 +0000
parents d674cef2ca0d
children
comparison
equal deleted inserted replaced
896:c7756576044f 897:02cd2935b5fa
31 * Default Logging instance 31 * Default Logging instance
32 */ 32 */
33 private static Logger sLogger = Logger.getLogger(DateUtils.class); 33 private static Logger sLogger = Logger.getLogger(DateUtils.class);
34 34
35 /** 35 /**
36 * The Dateformat which will be used e.g for Querying the Database 36 * The Dateformat which will be used e.g for Querying the Database
37 */ 37 */
38 public static final String DATE_PATTERN = "yyyy.MM.dd HH:mm:ss"; 38 public static final String DATE_PATTERN = "yyyy.MM.dd HH:mm:ss";
39 39
40 private static final String DATE_PATTERN1 = "dd-MMM-yyyy HH:mm:ss"; 40 private static final String DATE_PATTERN1 = "dd-MMM-yyyy HH:mm:ss";
41 41
50 fmt.applyPattern(sPattern); 50 fmt.applyPattern(sPattern);
51 return fmt.format(pDate); 51 return fmt.format(pDate);
52 } 52 }
53 53
54 /** 54 /**
55 * Returns the Date as a String formated using the 55 * Returns the Date as a String formated using the
56 * <code>DateUtils.DATE_PATTERN</code> format- 56 * <code>DateUtils.DATE_PATTERN</code> format-
57 * @param pDate the Date which should be formatted 57 * @param pDate the Date which should be formatted
58 * @return the given Data as a String 58 * @return the given Data as a String
59 */ 59 */
60 public static String getPatternedDateAmer(Date pDate) { 60 public static String getPatternedDateAmer(Date pDate) {
80 * @param sStr The String with the encoded DateValue 80 * @param sStr The String with the encoded DateValue
81 * @param sPattern The pattern which should be used to decode the Date 81 * @param sPattern The pattern which should be used to decode the Date
82 * @return the given Datevalue as an Date-Object. 82 * @return the given Datevalue as an Date-Object.
83 * @throws Exception throws all Expetion which occurs during the Process. 83 * @throws Exception throws all Expetion which occurs during the Process.
84 */ 84 */
85 public static Date getDateFromString (String sStr, 85 public static Date getDateFromString (String sStr,
86 String sPattern)throws Exception { 86 String sPattern)throws Exception {
87 SimpleDateFormat fmt = new SimpleDateFormat(); 87 SimpleDateFormat fmt = new SimpleDateFormat();
88 fmt.applyPattern(sPattern); 88 fmt.applyPattern(sPattern);
89 return fmt.parse(sStr); 89 return fmt.parse(sStr);
90 } 90 }

http://dive4elements.wald.intevation.org