[phpOpenTracker-User] FAQ entry fro using range
Jean-Christian Imbeault <[email protected]>
| Newsgroups | gmane.comp.web.phpopentracker.general |
|---|---|
| Message-ID | <[email protected]> |
I am having trouble understanding the documentation when it comes to
using ranges in the API. The docs say:
"In addition to the above values for the range parameter you may use the
following interval identifiers:
* minute
* hour
* day
* month
* year
These generic interval identifiers require two additional parameters,
range_start and range_length, and allow to specify timeranges that start
at current time - (range_start * length(range)) have a length of
range_length * length(range)."
For the calculation current time - (range_start * length(range)) I am
assuming that the current time is given in the same time units as the range?
If I wanted to get the top 3 requested documents for the three days from
January 01, 2003 to January 03, 2003 how would I calculate the
range_start? Would it be:
number of days from January 01, 2003 to current time?
What are the advantages to using this way of setting range parameters
versus just using the 'start' and 'end' timestamps? Having to calculate
the number of time units from a given point in time to now seems a bit
awkward.
Thanks :)
Jean-Christian Imbeault
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0