Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (type == FORMAT_TYPE.TIMESTAMP) {
- String formatValue = Context.getAdministrationService().getGlobalPropertyValue(propertyName, null);
- if (StringUtils.isEmpty(formatValue))
- dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);
- else
- dateFormat = new OpenmrsDateFormat(new SimpleDateFormat(formatValue), locale);
- }
- else if (type == FORMAT_TYPE.TIME) {
- dateFormat = DateFormat.getTimeInstance(DateFormat.MEDIUM, locale);
- }
- else {
- //if (type == FORMAT_TYPE.DATE) (default)
- dateFormat = DateFormat.getDateInstance(DateFormat.SHORT, locale);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement