<commit_before>---
layout: api-command
language: Python
permalink: api/python/during/
command: during
related_commands:
    now: now/
    time: time/
    in_timezone: in_timezone/
---

# Command syntax #

{% apibody %}
time.during(start_time, end_time[, left_bound="open/closed", right_bound="open/closed"])
    rarr; bool
{% endapibody %}

# Description #

Return if a time is between two other times (by default, inclusive for the start, exclusive for the end).

__Example:__ Retrieve all the posts that were posted between December 1st, 2013 (inclusive) and December 10th, 2013 (exclusive).

```py
r.table("posts").filter(
    r.row['date'].during(r.time(2013, 12, 1, "Z"), r.time(2013, 12, 10, "Z"))
).run(conn)
```


__Example:__ Retrieve all the posts that were posted between December 1st, 2013 (exclusive) and December 10th, 2013 (inclusive).

```py
r.table("posts").filter(
    r.row['date'].during(r.time(2013, 12, 1, "Z"), r.time(2013, 12, 10, "Z"), left_bound="open", right_bound="closed")
).run(conn)
```

<commit_msg>fixing typo in right arrow symbol<commit_after>---
layout: api-command
language: Python
permalink: api/python/during/
command: during
related_commands:
    now: now/
    time: time/
    in_timezone: in_timezone/
---

# Command syntax #

{% apibody %}
time.during(start_time, end_time[, left_bound="open/closed", right_bound="open/closed"])
    &rarr; bool
{% endapibody %}

# Description #

Return if a time is between two other times (by default, inclusive for the start, exclusive for the end).

__Example:__ Retrieve all the posts that were posted between December 1st, 2013 (inclusive) and December 10th, 2013 (exclusive).

```py
r.table("posts").filter(
    r.row['date'].during(r.time(2013, 12, 1, "Z"), r.time(2013, 12, 10, "Z"))
).run(conn)
```


__Example:__ Retrieve all the posts that were posted between December 1st, 2013 (exclusive) and December 10th, 2013 (inclusive).

```py
r.table("posts").filter(
    r.row['date'].during(r.time(2013, 12, 1, "Z"), r.time(2013, 12, 10, "Z"), left_bound="open", right_bound="closed")
).run(conn)
```


{'fraction_non_alphanumeric': 0.1598655784925588, 'fraction_numerical': 0.04992798847815651, 'mean_word_length': 4.572192513368984, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7373746', 'n_tokens_mistral': 825, 'n_tokens_neox': 699, 'n_words': 217}