Reverse order of arguments to DATEDIFF, for compatibility. Thanks to
[pspp] / src / language / expressions / ChangeLog
1 Sat Dec 16 12:20:14 2006  Ben Pfaff  <blp@gnu.org>
2
3         * operations.def: Reverse order of arguments to DATEDIFF, for
4         compatibility.  Thanks to Daniel Williams
5         <Daniel.E.Williams@state.or.us> for reporting this bug.
6
7 Wed Dec 13 19:30:26 2006  Ben Pfaff  <blp@gnu.org>
8
9         Implement support for DATESUM, DATEDIFF expression functions.  See
10         patch #5637.
11         
12         * helpers.c (enum date_unit): New enum.
13         [!HAVE_TRUNC] (trunc): New function.
14         (recognize_unit): New function.
15         (year_diff): New function.
16         (month_diff): New function.
17         (quarter_diff): New function.
18         (date_unit_duration): New function.
19         (expr_date_difference): New function.
20         (enum date_sum_method): New function.
21         (recognize_method): New function.
22         (add_months): New function.
23         (expr_date_sum): New function.
24         
25         * operations.def: Implement DATESUM, DATEDIFF functions.  Mark
26         VALUELABEL no_abbrev.
27
28 Sun Dec 10 16:49:33 2006  Ben Pfaff  <blp@gnu.org>
29
30         * operations.def: Implement VALUELABEL function.  Add DATEDIFF,
31         DATESUM unimplemented stubs.
32
33         * parse.c (type_coercion_core): Add support for OP_var type, which
34         is a name for a numeric or string variable.
35         (is_compatible) New function.
36         (check_operator) Only require values to be compatible with their
37         expected types, not identical.
38         (is_valid_node) Ditto.
39         (compare_names) Always return mismatch if the command name can't
40         be abbreviated.
41         (lookup_function_helper) Pass the new OPF_NO_ABBREV flag to the
42         comparison function.
43
44         * generate.pl (init_all_types): Add support for a type just called
45         "var" that may be a numeric or string variable name.  Also, add a
46         no_abbrev option that prevents a function name from being
47         abbreviated (in case of naming conflict otherwise).
48         
49         * parse.inc.pl: Output OPF_NO_ABBREV flag.
50
51         * private.h: Add OPF_NO_ABBREV flag.
52
53 Wed Jul 12 21:03:17 2006  Ben Pfaff  <blp@gnu.org>
54
55         * evaluate.c (cmd_debug_evaluate): Don't try to resize a null
56         case.
57
58 Fri Jun  9 13:59:15 2006  Ben Pfaff  <blp@gnu.org>
59
60         Reform string library.
61         
62         * generate.pl (init_all_types): `struct fixed_string' is now
63         `struct substring'.
64
65 Sun May  7 10:05:42 WST 2006 John Darrington <john@darrington.wattle.id.au>
66
67         * evaluate.c: Removed call to copy_mangle, and replaced with the
68         original buf_copy_rpad.
69
70 Mon May  1 15:11:48 2006  Ben Pfaff  <blp@gnu.org>
71
72         Prohibit LAG following TEMPORARY.  This both matches SPSS behavior
73         and fixes a bug: we saved the cases for LAG before TEMPORARY but
74         allowed access to variables created afterward anyhow (which could
75         cause a segfault).
76
77         * generate.pl: Parse "perm_only" flag on operations.
78
79         * operations.def: Add "perm_only" flag to LAG operations.
80
81         * parse.c: Disallow OPF_PERM_ONLY operations after TEMPORARY.
82
83         * parse.inc.pl: Output OPF_PERM_ONLY flag for "perm_only"
84         operations.
85
86         * private.h: Add OPF_PERM_ONLY flag.
87
88 Sun Apr 23 22:06:45 2006  Ben Pfaff  <blp@gnu.org>
89
90         Continue reforming error message support.  In this phase, get rid
91         of message "titles" and put the message text in `struct error'.
92         Now `struct error' encapsulates a message more properly.
93         
94         * helpers.c: (expr_error) Use err_msg() instead of err_vmsg().
95         Format message ourselves.
96
97 Thu Mar  2 08:40:33 WST 2006 John Darrington <john@darrington.wattle.id.au>
98         
99         * Moved files from src directory