Skip to content

RDoc-3765 RQL supports now() & today()#2433

Open
Danielle9897 wants to merge 5 commits into
ravendb:mainfrom
Danielle9897:RDoc-3765-RqlSupportsNowAndToday
Open

RDoc-3765 RQL supports now() & today()#2433
Danielle9897 wants to merge 5 commits into
ravendb:mainfrom
Danielle9897:RDoc-3765-RqlSupportsNowAndToday

Conversation

@Danielle9897
Copy link
Copy Markdown
Member

Issue link

https://issues.hibernatingrhinos.com/issue/RDoc-3765/RQL-supports-now-today

Additional description

  • Update the RQL article
  • Create a new article under Querying > Filtering Query Results > Filter by Date and Time
    • Filter by an explicit date (single date, date-range, between)
    • Filter using now()
    • Filter using now() with offset (future, past, offset format)
    • Filter using today()
    • Combining now() and today()
    • Restrictions
    • Result caching with time functions
    • Syntax

Type of change

  • Content - docs
  • Content - cloud
  • Content - guides
  • Content - start pages/other
  • New docs feature (consider updating /templates or readme)
  • Bug fix
  • Optimization
  • Other

Changes in docs URLs

  • No changes in docs URLs
  • Articles are restructured, URLs will change, mapping is required (update /scripts/redirects.json file, set Documents Moved PR label)

Changes in UX/UI

  • No changes in UX/UI
  • Changes in UX/UI (include screenshots and description)

@Danielle9897 Danielle9897 requested a review from ppekrol May 10, 2026 13:53

* `now()` can accept an optional positive or negative offset string, such as `+7d`, `-3d`, or `+1d5h`.

* When an offset is provided, RavenDB first **shifts the current time** by the specified amount
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add some flag that this is Important, bold? exclamation mark? upper case? not sure

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done - added admonition & uppercase

</TabItem>

This restriction applies only to the `now()` and `today()` functions.
These functions are blocked in exploration and subscription queries because their value depends on when the expression is evaluated, which can lead to caching correctness issues.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with subscriptions it is not a matter of caching, but yielding indeterministic results due to the fact that this is an ongoing task, so using now/today would dynamically (and drastically) change the results depending on the execution time

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@Danielle9897 Danielle9897 requested a review from ppekrol May 15, 2026 10:58
@Danielle9897 Danielle9897 force-pushed the RDoc-3765-RqlSupportsNowAndToday branch from 246e5d7 to 3777950 Compare May 15, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants