Implement DATESUM, DATEDIFF functions.
[pspp-builds.git] / src / language / expressions / ChangeLog
index 5b04f9ffdb49806ca7b1b92c47a371708da4ba56..a55b977f863d8c1ccefc8ea275e0b941edd90490 100644 (file)
@@ -1,3 +1,86 @@
+Wed Dec 13 19:33:52 2006  Ben Pfaff  <blp@gnu.org>
+
+Wed Dec 13 19:30:26 2006  Ben Pfaff  <blp@gnu.org>
+
+       Implement support for DATESUM, DATEDIFF expression functions.  See
+       patch #5637.
+       
+       * helpers.c (enum date_unit): New enum.
+       [!HAVE_TRUNC] (trunc): New function.
+       (recognize_unit): New function.
+       (year_diff): New function.
+       (month_diff): New function.
+       (quarter_diff): New function.
+       (date_unit_duration): New function.
+       (expr_date_difference): New function.
+       (enum date_sum_method): New function.
+       (recognize_method): New function.
+       (add_months): New function.
+       (expr_date_sum): New function.
+       
+       * operations.def: Implement DATESUM, DATEDIFF functions.  Mark
+       VALUELABEL no_abbrev.
+
+Sun Dec 10 16:49:33 2006  Ben Pfaff  <blp@gnu.org>
+
+       * operations.def: Implement VALUELABEL function.  Add DATEDIFF,
+       DATESUM unimplemented stubs.
+
+       * parse.c (type_coercion_core): Add support for OP_var type, which
+       is a name for a numeric or string variable.
+       (is_compatible) New function.
+       (check_operator) Only require values to be compatible with their
+       expected types, not identical.
+       (is_valid_node) Ditto.
+       (compare_names) Always return mismatch if the command name can't
+       be abbreviated.
+       (lookup_function_helper) Pass the new OPF_NO_ABBREV flag to the
+       comparison function.
+
+       * generate.pl (init_all_types): Add support for a type just called
+       "var" that may be a numeric or string variable name.  Also, add a
+       no_abbrev option that prevents a function name from being
+       abbreviated (in case of naming conflict otherwise).
+       
+       * parse.inc.pl: Output OPF_NO_ABBREV flag.
+
+       * private.h: Add OPF_NO_ABBREV flag.
+
+Wed Jul 12 21:03:17 2006  Ben Pfaff  <blp@gnu.org>
+
+       * evaluate.c (cmd_debug_evaluate): Don't try to resize a null
+       case.
+
+Fri Jun  9 13:59:15 2006  Ben Pfaff  <blp@gnu.org>
+
+       Reform string library.
+       
+       * generate.pl (init_all_types): `struct fixed_string' is now
+       `struct substring'.
+
+Sun May  7 10:05:42 WST 2006 John Darrington <john@darrington.wattle.id.au>
+
+       * evaluate.c: Removed call to copy_mangle, and replaced with the
+       original buf_copy_rpad.
+
+Mon May  1 15:11:48 2006  Ben Pfaff  <blp@gnu.org>
+
+       Prohibit LAG following TEMPORARY.  This both matches SPSS behavior
+       and fixes a bug: we saved the cases for LAG before TEMPORARY but
+       allowed access to variables created afterward anyhow (which could
+       cause a segfault).
+
+       * generate.pl: Parse "perm_only" flag on operations.
+
+       * operations.def: Add "perm_only" flag to LAG operations.
+
+       * parse.c: Disallow OPF_PERM_ONLY operations after TEMPORARY.
+
+       * parse.inc.pl: Output OPF_PERM_ONLY flag for "perm_only"
+       operations.
+
+       * private.h: Add OPF_PERM_ONLY flag.
+
 Sun Apr 23 22:06:45 2006  Ben Pfaff  <blp@gnu.org>
 
        Continue reforming error message support.  In this phase, get rid