diff options
author | Yves Fischer <yves.fischer@cern.ch> | 2016-01-26 12:00:49 +0100 |
---|---|---|
committer | Yves Fischer <yves.fischer@cern.ch> | 2016-01-26 12:00:49 +0100 |
commit | 57a3a39ba2b79c37f59d212bb14c7f9df91cf478 (patch) | |
tree | 361ce0fb02cf64d4abc51018bf21a5b808ab4335 /src/main/groovy/org/xapek/yvesf | |
parent | 9614bfef37e5fcc7f048150480b767f1afbac1a5 (diff) | |
download | glocals-classifieds-57a3a39ba2b79c37f59d212bb14c7f9df91cf478.tar.gz glocals-classifieds-57a3a39ba2b79c37f59d212bb14c7f9df91cf478.zip |
more fix rss feed
Diffstat (limited to 'src/main/groovy/org/xapek/yvesf')
-rw-r--r-- | src/main/groovy/org/xapek/yvesf/classifieds/Model.groovy | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/groovy/org/xapek/yvesf/classifieds/Model.groovy b/src/main/groovy/org/xapek/yvesf/classifieds/Model.groovy index b0c9e00..ac5ca13 100644 --- a/src/main/groovy/org/xapek/yvesf/classifieds/Model.groovy +++ b/src/main/groovy/org/xapek/yvesf/classifieds/Model.groovy @@ -2,6 +2,8 @@ package org.xapek.yvesf.classifieds import groovy.transform.CompileStatic +import java.text.SimpleDateFormat + @CompileStatic class Model { static class Classified { @@ -62,8 +64,10 @@ class Model { } } + final static SimpleDateFormat dateParser = new SimpleDateFormat('MMM dd, yy', Locale.GERMANY) + final static SimpleDateFormat dateFormatter = new SimpleDateFormat('EEE, dd MMM yyyy HH:mm:ss Z', Locale.ROOT) String getFormattedDate() { - return Date.parse('MMM dd, yy', date).format('EEE, dd MMM yyyy HH:mm:ss Z') + return dateFormatter.format(dateParser.parse(date)) } String getLink() { return "http://www.glocals.com/classifieds/housing-and-real-estate/${id}.htm" |