From 242c70ed5f0e2b84e9608bace183052e745614ed Mon Sep 17 00:00:00 2001 From: Alvaro Videla Date: Fri, 25 Dec 2009 16:58:47 +0800 Subject: 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 --- lib/sasl/doc/src/rb.xml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'lib/sasl/doc/src/rb.xml') 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 @@ filter(Filters) + filter(Filters, Dates) Filter reports and displays them on the screen Filters = [filter()] @@ -51,6 +52,9 @@ Key = term() Value = term() RegExp = string() | {string, Options} | mp(), {mp(), Options} + Dates = {DateFrom, DateTo} | {DateFrom, from} | {DateTo, to} + DateFrom = DateTo = {date(), time()} + date() and time() are the same type as in the calendar module

This function displays the reports that match the provided filters.

@@ -66,6 +70,25 @@ If the filter is of the form {Key, RegExp, re} the report must contain an element with key = Key and Value must match the RegExp regular expression.

+

+ If the Dates parameter is provided, then the reports are filtered according to the date + when they occurred. If Dates is of the form {DateFrom, from} then reports that occurred + after DateFrom are displayed. +

+

+ If Dates is of the form {DateTo, to} then reports that occurred before DateTo + are displayed. +

+

+ If two Dates are provided, then reports that occurred between those dates are returned. +

+

+ If you only want to filter only by dates, then you can provide the empty list as the Filters + parameter. +

+

+ See rb:grep/1 for more information on the RegExp parameter. +

-- cgit v1.2.3