Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
Make this change in the Time function please:
Index: bliki-core/src/main/java/info/bliki/wiki/template/Time.java
===================================================================
--- bliki-core/src/main/java/info/bliki/wiki/template/Time.java (revision 3995)
+++ bliki-core/src/main/java/info/bliki/wiki/template/Time.java (working copy)
@@ -150,7 +150,7 @@
Date date;
DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, model.getLocale());
if (list.size() > 1) {
- String dateTimeParameter = list.get(1);
+ String dateTimeParameter = parse(list.get(1), model);
try {
date = df.parse(dateTimeParameter);
Original comment by axelclk@gmail.com
on 11 Apr 2012 at 1:33
yes, that worked - on a side-note, the locale for parsing the given date should
be English (that's what PHP's strtotime() accepts which is what mediawiki uses)
- I had that wrong, previously
diff --git a/bliki-core/src/main/java/info/bliki/wiki/template/Time.java
b/bliki-core/src/main/java/info/bliki/wiki/template/Time.java
index eb3836e..0c1862c 100644
--- a/bliki-core/src/main/java/info/bliki/wiki/template/Time.java
+++ b/bliki-core/src/main/java/info/bliki/wiki/template/Time.java
@@ -148,9 +148,9 @@ public class Time extends AbstractTemplateFunction {
public String parseFunction(List<String> list, IWikiModel model, char[] src, int beginIndex, int endIndex) {
if (list.size() > 0) {
Date date;
- DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM,
model.getLocale());
+ DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM,
Locale.ENGLISH);
if (list.size() > 1) {
- String dateTimeParameter = list.get(1);
+ String dateTimeParameter = parse(list.get(1), model);
try {
date = df.parse(dateTimeParameter);
Original comment by nico.kru...@googlemail.com
on 11 Apr 2012 at 1:41
Problem should be fixed with r4457
Original comment by axelclk@gmail.com
on 14 Apr 2012 at 11:39
thank you
Original comment by nico.kru...@googlemail.com
on 16 Apr 2012 at 12:10
Original comment by axelclk@gmail.com
on 27 Apr 2012 at 9:46
Original issue reported on code.google.com by
nico.kru...@googlemail.com
on 11 Apr 2012 at 12:51