Advertisement
Guest User

Untitled

a guest
Jan 15th, 2013
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. if (type == FORMAT_TYPE.TIMESTAMP) {
  2. String formatValue = Context.getAdministrationService().getGlobalPropertyValue(propertyName, null);
  3. if (StringUtils.isEmpty(formatValue))
  4. dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);
  5. else
  6. dateFormat = new OpenmrsDateFormat(new SimpleDateFormat(formatValue), locale);
  7. }
  8. else if (type == FORMAT_TYPE.TIME) {
  9. dateFormat = DateFormat.getTimeInstance(DateFormat.MEDIUM, locale);
  10. }
  11. else {
  12. //if (type == FORMAT_TYPE.DATE) (default)
  13. dateFormat = DateFormat.getDateInstance(DateFormat.SHORT, locale);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement