From bf7ddfdeb7a81c112c5c9c25c4819bc576e87859 Mon Sep 17 00:00:00 2001 From: Robert Antoni Buj i Gelonch Date: Mon, 29 Sep 2014 14:51:24 +0200 Subject: Fix java.util.Calendar.set in integration.forms.DateValidator Change-Id: I1bd87c623b923469c325ebfcba4ba82e2a648ae2 Reviewed-on: https://gerrit.libreoffice.org/11694 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- forms/qa/integration/forms/DateValidator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'forms') diff --git a/forms/qa/integration/forms/DateValidator.java b/forms/qa/integration/forms/DateValidator.java index 76cb6ca6a0fb..055e77952314 100644 --- a/forms/qa/integration/forms/DateValidator.java +++ b/forms/qa/integration/forms/DateValidator.java @@ -75,7 +75,7 @@ public class DateValidator extends integration.forms.ControlValidator java.util.Calendar today = java.util.Calendar.getInstance(); java.util.Calendar date = (java.util.Calendar) today.clone(); today.set(java.util.Calendar.DATE, 1); - date.set(dateValue.Year, dateValue.Month, 1); + date.set(dateValue.Year, dateValue.Month -1, 1); // Month value is 0-based. e.g., 0 for January. date.add(java.util.Calendar.MONTH, -1); return date.compareTo(today) == 0; } -- cgit