Skip to content
Browse files

[DS-469] DCDate.displayDate display full date when granularity is TIM…

…E but time suppressed

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4834 9c30dcfa-912a-0410-8fc2-9e0234be79fd
  • Loading branch information...
1 parent d2380b0 commit 70b1d8ffc67e054f74ff4958ccec8412df369aa2 @mwoodiupui mwoodiupui committed Mar 29, 2010
Showing with 6 additions and 3 deletions.
  1. +3 −3 dspace-api/src/main/java/org/dspace/content/DCDate.java
  2. +3 −0 dspace/CHANGES
View
6 dspace-api/src/main/java/org/dspace/content/DCDate.java
@@ -639,17 +639,17 @@ public String displayDate(boolean showTime, boolean isLocalTime, Locale locale)
dd.getHourGMT(), dd.getMinuteGMT(), dd.getSecondGMT());
}
}
- else if (granularity == DateGran.DAY)
+ else if (granularity == DateGran.YEAR)
{
- return String.format("%d-%s-%4d", dd.getDay(), monthName, dd.getYear());
+ return String.format("%4d", dd.getYear());
}
else if (granularity == DateGran.MONTH)
{
return String.format("%s-%4d", monthName, dd.getYear());
}
else
{
- return String.format("%4d", dd.getYear());
+ return String.format("%d-%s-%4d", dd.getDay(), monthName, dd.getYear());
}
}
}
View
3 dspace/CHANGES
@@ -10,6 +10,9 @@
(Stuart Lewis)
- [DS-506] embargo-lifter command missing from launcher.xml
+(Mark Wood)
+ - [DS-469] DCDate.displayDate(false,*) displays only year
+
1.6.0 final
===========

0 comments on commit 70b1d8f

Please sign in to comment.
Something went wrong with that request. Please try again.