Displaying differences for changeset
display as  

src/csip/Check.java

@@ -1,5 +1,5 @@
 /*
- * $Id: 2.7+14 Check.java 773d4dd2e419 2022-10-27 od $
+ * $Id$
  *
  * This file is part of the Cloud Services Integration Platform (CSIP),
  * a Model-as-a-Service framework, API and application suite.
@@ -233,9 +233,12 @@
     return this;
   }
 
+  // start and end are inclusive
   public Check inBetween(LocalDate start, LocalDate end) {
     checks.add(n -> {
-      LocalDate d = (LocalDate) n;
+      LocalDate d = toLocalDate(n);
+      if (d.equals(start) || d.equals(end))
+        return null;
       if (!(d.isAfter(start) && d.isBefore(end)))
         return d + " not in date range " + start + "..." + end;
       return null;
@@ -288,7 +291,7 @@
     return this;
   }
 
-  private double toDouble(Object o) {
+  private static double toDouble(Object o) {
     if (o instanceof Number)
       return ((Number) o).doubleValue();
     if (o instanceof String) {
@@ -297,7 +300,18 @@
     throw new IllegalArgumentException(o + " cannot be converted into double.");
   }
 
-  private int toInt(Object o) {
+  public static LocalDate toLocalDate(Object o) {
+    if (o instanceof LocalDate)
+      return (LocalDate) o;
+    if (o instanceof String) {
+      String date = o.toString();
+      LocalDate ld = LocalDate.parse(date, DateTimeFormatter.ISO_DATE);
+      return ld;
+    }
+    throw new IllegalArgumentException(o + " cannot be converted into double.");
+  }
+
+  private static int toInt(Object o) {
     if (o instanceof Number)
       return ((Number) o).intValue();
     if (o instanceof String) {

src/csip/Config.java

@@ -159,7 +159,7 @@
       /*
        * The CSIP version for platform and context (placeholder)
        */
-      put(CSIP_PLATFORM_VERSION, "$version: 2.8.31 default 924 284c3f853fa8 2025-01-14 od, built at 2025-01-22 09:46 by od$");
+      put(CSIP_PLATFORM_VERSION, "$version: 2.8.32 default 925 39a3cb74137a 2025-01-23 od, built at 2025-02-04 14:32 by od$");
       put(CSIP_CONTEXT_VERSION, "$version: 0.0.0 000000000000");
 
       put("csip.response.version", "true");