Created
April 28, 2015 22:21
-
-
Save AdamMc331/4649e0f1fec5cf89aaa0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static String getUIDateString(LocalDate d){ | |
// Do not allow dates with negative years | |
if(d.getYear() < 0){ | |
throw new UnsupportedOperationException("LocalDate has negative year value."); | |
} else { | |
DateTimeFormatter dtf = DateTimeFormat.forPattern(UI_DATE_FORMAT); | |
return dtf.print(d); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment