Skip to content

Commit ec23dc2

Browse files
Ilya Brinjknack
authored andcommitted
accept locale as a hash param for dateFormat helper
1 parent f0a0572 commit ec23dc2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

handlebars/src/main/java/com/github/jknack/handlebars/helper/StringHelpers.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ protected CharSequence safeApply(final Object value, final Options options) {
537537
Date date = (Date) value;
538538
final DateFormat dateFormat;
539539
Object pattern = options.param(0, options.hash("format", "medium"));
540-
String localeStr = options.param(1, Locale.getDefault().toString());
540+
String localeStr = options.param(1, options.hash("locale", Locale.getDefault().toString()));
541541
Locale locale = LocaleUtils.toLocale(localeStr);
542542
Integer style = styles.get(pattern);
543543
if (style == null) {

0 commit comments

Comments
 (0)