time.during(startTime, endTime[, {leftBound: "closed", rightBound: "open"}]) → bool
Return whether a time is between two other times.
By default, this is inclusive of the start time and exclusive of the end time. Set leftBound
and rightBound
to explicitly include (closed
) or exclude (open
) that endpoint of the range.
Example: Retrieve all the posts that were posted between December 1st, 2013 (inclusive) and December 10th, 2013 (exclusive).
r.table("posts").filter(
r.row('date').during(r.time(2013, 12, 1, "Z"), r.time(2013, 12, 10, "Z"))
).run(conn, callback)
Example: Retrieve all the posts that were posted between December 1st, 2013 (exclusive) and December 10th, 2013 (inclusive).
r.table("posts").filter(
r.row('date').during(r.time(2013, 12, 1, "Z"), r.time(2013, 12, 10, "Z"), {leftBound: "open", rightBound: "closed"})
).run(conn, callback)
Couldn't find what you were looking for?
Contribute: edit this page or open an issue