diff options
author | Robert Antoni Buj i Gelonch <robert.buj@gmail.com> | 2014-09-29 14:51:24 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-09-29 12:54:30 +0000 |
commit | bf7ddfdeb7a81c112c5c9c25c4819bc576e87859 (patch) | |
tree | 2f9b2d90c609c6d93a97c3ccc259fab308db4aaf /forms | |
parent | 72f50083e713bb4f25b6acc31ecad3ae7aa9050e (diff) |
Fix java.util.Calendar.set in integration.forms.DateValidator
Change-Id: I1bd87c623b923469c325ebfcba4ba82e2a648ae2
Reviewed-on: https://gerrit.libreoffice.org/11694
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'forms')
-rw-r--r-- | forms/qa/integration/forms/DateValidator.java | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |