[DS-469] DCDate.displayDate(false,*) displays only year

N.B. Removed reference from 1.6.1 in CHANGES as this looks like it was accidentally added in revision 4958)

git-svn-id: http://scm.dspace.org/svn/repo/dspace/branches/dspace-1_6_x@5245 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Stuart Lewis
2010-08-08 09:20:34 +00:00
parent 612508d613
commit e57e224734
2 changed files with 11 additions and 7 deletions

View File

@@ -685,9 +685,9 @@ public class DCDate
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)
{
@@ -695,7 +695,7 @@ public class DCDate
}
else
{
return String.format("%4d", dd.getYear());
return String.format("%d-%s-%4d", dd.getDay(), monthName, dd.getYear());
}
}
}