<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/joda-time-1.6.jar</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,8 @@
 == Changes in version 1.3
 
+* http://github.com/dima767/grails-crowd/issues/closed/#issue/1
+* http://github.com/dima767/grails-crowd/issues/closed/#issue/3
+
 * Upgraded to Grails 1.1.1
 
 == Changes in version 1.2.3</diff>
      <filename>changelog.txt</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,5 @@
+import org.joda.time.*
+
 class NiceDateTagLib {
 
 	public static String getNiceDate(Date date) {
@@ -43,7 +45,39 @@ class NiceDateTagLib {
 
     }
 
+    public static String getNiceDateUsingJoda(Date date) {		
+		def from = null
+		def to = null
+		try {
+			from = new DateTime(date)
+			to = new DateTime(new Date())
+		}
+		catch(Exception e) {
+			return ''
+		}
 
+		Period period = new Period(from, to, PeriodType.yearMonthDayTime())
+		def mi = period.minutes
+		def h = period.hours
+		def d = period.days
+		def m = period.months
+		def y = period.years
+	
+		def output = ''
+		if(y &gt; 0) output += &quot;$y &quot; + &quot;year&quot; + (y &gt; 1 ? &quot;s &quot; : &quot; &quot;)
+		if(m &gt; 0) output += &quot;$m &quot; + &quot;month&quot; + (m &gt; 1 ? &quot;s &quot; : &quot; &quot;)
+		if(w &gt; 0) output += &quot;$w &quot; + &quot;week&quot; + (w &gt; 1 ? &quot;s &quot; : &quot; &quot;)
+		if(d &gt; 0) output += &quot;$d &quot; + &quot;day&quot; + (d &gt; 1 ? &quot;s &quot; : &quot; &quot;)
+		if(h &gt; 0) output += &quot;$h &quot; + &quot;hour&quot; + (h &gt; 1 ? &quot;s &quot; : &quot; &quot;)
+		if(mi &gt; 0) output += &quot;$mi &quot; + &quot;minute&quot; + (mi &gt; 1 ? &quot;s &quot; : &quot; &quot;)
+		if(output.size() &gt; 0) {
+		    output += ' ago'
+		}
+		else {
+			output += 'less than a minute ago'
+		}
+		return output
+	}
 
 	def niceDate = { attrs, body -&gt;
         def date = attrs.date
@@ -52,6 +86,6 @@ class NiceDateTagLib {
 	}
 	
 	def niceAgoDate = { attrs, body -&gt;
-        out &lt;&lt; getNiceDate(attrs.date)
+        out &lt;&lt; getNiceDateUsingJoda(attrs.date)
 	}
 }</diff>
      <filename>grails-app/taglib/NiceDateTagLib.groovy</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>09a4705132e9b5c34e4c368900200ebc40afbec9</id>
    </parent>
  </parents>
  <author>
    <name>Dmitriy Kopylenko</name>
    <email>dima767@gmail.com</email>
  </author>
  <url>http://github.com/dima767/grails-crowd/commit/dd425e29b32feb58d4d6fd1b97b56362520bf6dd</url>
  <id>dd425e29b32feb58d4d6fd1b97b56362520bf6dd</id>
  <committed-date>2009-06-01T08:29:48-07:00</committed-date>
  <authored-date>2009-06-01T08:29:48-07:00</authored-date>
  <message>closing http://github.com/dima767/grails-crowd/issues/closed/#issue/1</message>
  <tree>012ced9820a84bae1c3a23f20c0bf4a8170d2c37</tree>
  <committer>
    <name>Dmitriy Kopylenko</name>
    <email>dima767@gmail.com</email>
  </committer>
</commit>
