📣 The Wait is Over! Semantic search is now available on CourtListener. Already live in our API, you can now search case law using natural language directly on the website. Click the & / ? toggle to switch between keyword and natural language search.

Learn more here!

Help with Relative Date Queries

Use relative dates in your queries to keep your searches and alerts dynamically up to date.

When placing a search query into CourtListener, you can use either "Calendar" date queries or "Relative" date queries:

  • Calendar date queries let you filter before or after a given date.
  • Relative dates filter results dynamically based on the date the query is made by a user or system. Instead of specifying a calendar date, such a "January 1, 2025", you can use relative time periods like 1 day ago, Past 1 month, or -14d.

Relative date queries are useful for saved or bookmarked queries, so that your query always filters to recent content. They are also valuable when creating alerts. Imagine you want to receive an alert whenever a recent document — filed in the past week — is made available in the RECAP Archive. With relative dates, your date range is rolling, and the "Past Week" changes in sync with the date the alert is triggered.

Allowed Syntax

You can use the following syntax:

  • Xd ago
  • X days ago
  • -Xd
  • -Xd ago
  • -X days
  • Past X days

To filter to months or years, substitute m, months, y, or years instead of d or days.

When using the Search API, relative dates are accepted on all date filters, even if they are not supported by the website.

Notes

  • The past day (d) begins at 12:00am UTC the previous day and continues up to the time of the query.
    Example: Suppose today is Monday the 26th.
    • If you run a "Past 1 day" query at 20:00 local time in New York (Eastern Time, UTC–4, which is 00:00 UTC on Tuesday the 27th), you’ll get filings from 00:00 UTC Monday through 00:00 UTC Tuesday.
    • If you run the same query at 19:59 local time (which is 23:59 UTC Monday), you'll get filings from 00:00 UTC Sunday through 23:59 UTC Monday.
  • Similarly, the past X days begin at 12:00am UTC X days before the current day, and continue up to the current time.
  • One month (m) is equal to 30 days, so 12m is equal to 360 days, not 365 days.
  • One year (y) is equal to 365 days regardless of leap years.

Please Support Open Legal Data

These services are sponsored by Free Law Project and users like you. We provide these services in furtherance of our mission to make the legal sector more innovative and equitable.

We have provided these services for over a decade, and we need your contributions to continue curating and enhancing them.

Will you support us today by becoming a member?

Newsletter

Sign up to receive the Free Law Project newsletter with tips and announcements.