Skip to content

Commit

Permalink
[DS-763] Allow for japanese month names with only two characters.
Browse files Browse the repository at this point in the history
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5911 9c30dcfa-912a-0410-8fc2-9e0234be79fd
  • Loading branch information
Robin Taylor committed Nov 29, 2010
1 parent 054c4dc commit dacd088
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions dspace-api/src/main/java/org/dspace/content/DCDate.java
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,9 @@ public String displayDate(boolean showTime, boolean isLocalTime, Locale locale)
public String displayLocalDate(boolean showTime, Locale locale)
{
// forcibly truncate month name to 3 chars -- XXX FIXME?
String monthName = getMonthName(getMonth(), locale).substring(0, 3);
String monthName = getMonthName(getMonth(), locale);
if (monthName.length() > 2)
monthName = monthName.substring(0, 3);

// display date and time
if (showTime && granularity == DateGran.TIME)
Expand All @@ -515,7 +517,9 @@ else if (granularity == DateGran.MONTH)
public String displayUTCDate(boolean showTime, Locale locale)
{
// forcibly truncate month name to 3 chars -- XXX FIXME?
String monthName = getMonthName(getMonthUTC(), locale).substring(0, 3);
String monthName = getMonthName(getMonthUTC(), locale);
if (monthName.length() > 2)
monthName = monthName.substring(0, 3);

// display date and time
if (showTime && granularity == DateGran.TIME)
Expand Down Expand Up @@ -628,4 +632,4 @@ public static String getMonthName(int m, Locale locale)

}

}
}

0 comments on commit dacd088

Please sign in to comment.