diff options
author | Alvaro Videla <[email protected]> | 2009-12-25 16:58:47 +0800 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-02-14 12:15:09 +0100 |
commit | 242c70ed5f0e2b84e9608bace183052e745614ed (patch) | |
tree | ea2d08efe827b4fe49c482d95c1d4a6aeb255519 /lib/sasl/doc/src/rb.xml | |
parent | e99ec8e235beb16d35e5a940b814061fb87db989 (diff) | |
download | otp-242c70ed5f0e2b84e9608bace183052e745614ed.tar.gz otp-242c70ed5f0e2b84e9608bace183052e745614ed.tar.bz2 otp-242c70ed5f0e2b84e9608bace183052e745614ed.zip |
New rb:filter/2 to filter reports by date
The function filter/2 expects a second parameter
Dates that can be used to return reports that
occurred between the provided dates.
Usage:
Dec22 = {{2009,12,22},{0,0,0}}.
Dec24 = {{2009,12,24},{0,0,0}}.
rb:filter(Filters, {Dec22, from}).
%will return reports that occurred from Dec22.
rb:filter(Filters, {Dec22, to}).
%will return reports that occurred before Dec22.
rb:filter(Filters, {Dec22, Dec24}).
%will return reports that occurred between Dec22
% and Dec24
Diffstat (limited to 'lib/sasl/doc/src/rb.xml')
-rw-r--r-- | lib/sasl/doc/src/rb.xml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/sasl/doc/src/rb.xml b/lib/sasl/doc/src/rb.xml index 0b5df29333..bb205c0554 100644 --- a/lib/sasl/doc/src/rb.xml +++ b/lib/sasl/doc/src/rb.xml @@ -44,6 +44,7 @@ <funcs> <func> <name>filter(Filters)</name> + <name>filter(Filters, Dates)</name> <fsummary>Filter reports and displays them on the screen</fsummary> <type> <v>Filters = [filter()]</v> @@ -51,6 +52,9 @@ <v>Key = term()</v> <v>Value = term()</v> <v>RegExp = string() | {string, Options} | mp(), {mp(), Options}</v> + <v>Dates = {DateFrom, DateTo} | {DateFrom, from} | {DateTo, to}</v> + <v>DateFrom = DateTo = {date(), time()}</v> + <v>date() and time() are the same type as in the <c>calendar</c> module</v> </type> <desc> <p>This function displays the reports that match the provided filters.</p> @@ -66,6 +70,25 @@ If the filter is of the form <c>{Key, RegExp, re}</c> the report must contain an element with <c>key = Key</c> and <c>Value</c> must match the RegExp regular expression. </p> + <p> + If the Dates parameter is provided, then the reports are filtered according to the date + when they occurred. If Dates is of the form <c>{DateFrom, from}</c> then reports that occurred + after DateFrom are displayed. + </p> + <p> + If Dates is of the form <c>{DateTo, to}</c> then reports that occurred before DateTo + are displayed. + </p> + <p> + If two Dates are provided, then reports that occurred between those dates are returned. + </p> + <p> + If you only want to filter only by dates, then you can provide the empty list as the Filters + parameter. + </p> + <p> + See <c>rb:grep/1</c> for more information on the RegExp parameter. + </p> </desc> </func> <func> |