aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/helpers/link_to_helper.rb6
-rw-r--r--app/views/user/_user_listing_single.rhtml2
-rw-r--r--app/views/user/show.rhtml2
3 files changed, 7 insertions, 3 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb
index 4cba2b663..3f649f01d 100644
--- a/app/helpers/link_to_helper.rb
+++ b/app/helpers/link_to_helper.rb
@@ -5,7 +5,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: link_to_helper.rb,v 1.49 2008-12-17 13:01:35 francis Exp $
+# $Id: link_to_helper.rb,v 1.50 2009-02-12 19:50:56 francis Exp $
module LinkToHelper
@@ -186,6 +186,10 @@ module LinkToHelper
return date.strftime("%e %B %Y").strip
end
+ def year_from_date(date)
+ return date.strftime("%Y").strip
+ end
+
end
diff --git a/app/views/user/_user_listing_single.rhtml b/app/views/user/_user_listing_single.rhtml
index cd2328418..4f0496fd8 100644
--- a/app/views/user/_user_listing_single.rhtml
+++ b/app/views/user/_user_listing_single.rhtml
@@ -9,7 +9,7 @@ end %>
<span class="bottomline">
<%= pluralize(display_user.info_requests.size, "request") %> made.
<%= pluralize(display_user.visible_comments.size, "annotation") %> made.
- Joined on <%= simple_date(display_user.created_at) %>.
+ Joined in <%= year_from_date(display_user.created_at) %>.
</span>
</div>
diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml
index 7e85faabe..ce8b510c4 100644
--- a/app/views/user/show.rhtml
+++ b/app/views/user/show.rhtml
@@ -33,7 +33,7 @@
<div class="single_user">
<h1><%=@title%></h1>
<p class="subtitle">
- Joined WhatDoTheyKnow on <%= simple_date(@display_user.created_at) %>
+ Joined WhatDoTheyKnow in <%= year_from_date(@display_user.created_at) %>
<% if !@user.nil? && @user.admin_page_links? %>
(<%= link_to "admin", user_admin_url(@display_user) %>)
<% end %>