diff --git a/extensions/wikidata/src/org/openrefine/wikidata/schema/WbDateConstant.java b/extensions/wikidata/src/org/openrefine/wikidata/schema/WbDateConstant.java index 75268b6ca..86213f14e 100644 --- a/extensions/wikidata/src/org/openrefine/wikidata/schema/WbDateConstant.java +++ b/extensions/wikidata/src/org/openrefine/wikidata/schema/WbDateConstant.java @@ -112,7 +112,7 @@ public class WbDateConstant implements WbExpression { Calendar calendar = Calendar.getInstance(); TimeValue todaysDate = Datamodel.makeTimeValue( calendar.get(Calendar.YEAR), - (byte)calendar.get(Calendar.MONTH), + (byte)(calendar.get(Calendar.MONTH)+1), (byte)calendar.get(Calendar.DAY_OF_MONTH), (byte)0, (byte)0, (byte)0, (byte)11, 0,0,0, TimeValue.CM_GREGORIAN_PRO); return todaysDate; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbDateConstantTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbDateConstantTest.java index 1df4d3c8c..64e8c610c 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbDateConstantTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbDateConstantTest.java @@ -95,7 +95,7 @@ public class WbDateConstantTest extends WbExpressionTest { TimeValue expectedDate = Datamodel.makeTimeValue( calendar.get(Calendar.YEAR), (byte)calendar.get(Calendar.MONTH), - (byte)calendar.get(Calendar.DAY_OF_MONTH), + (byte)(calendar.get(Calendar.DAY_OF_MONTH)+1), (byte)0, (byte)0, (byte)0, (byte)11, 0,0,0, TimeValue.CM_GREGORIAN_PRO); evaluatesTo(expectedDate, new WbDateConstant("TODAY")); }