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