---
title: "Highlighting entries about to expire &#8220;today&#8221;"
date: 2026-04-23
author: "GravityKit"
link: "https://www.gravitykit.com/docs/gravityview/shortcodes/highlighting-entries-about-to-expire/"
---

GravityKit released a new add-on called [Gravity Forms Entry Tags](https://www.gravitykit.com/products/gravity-forms-entry-tags/) that helps you achieve the same as what is described in this article but in a very easy way. [Read more about this new add-on.](https://www.gravitykit.com/docs/gravity-forms-entry-tags/getting-started-with-the-gravity-forms-entry-tags/)

Occasionally, you want to add a visual indicator to your View results to bring attention to an entry where the action is needed or its expiration time is due "today".

Here's how to achieve that using the [ shortcode](https://www.gravitykit.com/docs/gravityview/shortcodes/gvlogic-shortcode/#date-context-examples) and a [Custom Content field](https://www.gravitykit.com/docs/gravityview/getting-started-gravityview/using-the-custom-content-field/).

In this tutorial, we will use a very simple form containing just two fields: a Task Description field which is a Single Line Text, and a Task Due Date which is a Date type field.

This is what our initial View looks like:

![To-do list showing upcoming tasks with due dates, focuses on expiring entries today](https://www.gravitykit.com/wp-content/uploads/2025/10/file-glaYutz7Mw.png)
Let's add a Custom Content field to our View and write three `[gvlogic]` shortcode statements inside:![Code for highlighting tasks: expired, expiring today, or on time with HTML and shortcodes](https://www.gravitykit.com/wp-content/uploads/2025/10/file-2hjVpwTIH6.png)
*Here's the code:*
```
[gvlogic if="{Task Due Date:3:mdy}" less_than="{date_mdy}"]    Expired[/gvlogic][gvlogic if="{Task Due Date:3:mdy}" is="{date_mdy}"]    Expiring Soon[/gvlogic][gvlogic if="{Task Due Date:3:mdy}" greater_than="{date_mdy}"]    On Time[/gvlogic]
```

```
[gvlogic if="{Task Due Date:3:mdy}" less_than="{date_mdy}"]    Expired[/gvlogic][gvlogic if="{Task Due Date:3:mdy}" is="{date_mdy}"]    Expiring Soon[/gvlogic][gvlogic if="{Task Due Date:3:mdy}" greater_than="{date_mdy}"]    On Time[/gvlogic]
```

Notice that we added one logic for each of three possible task statuses: Expired, Expiring Soon, and On Time.

The date field Merge Tag `{Task Due Date:3}` is using the `:mdy` modifier to modify this date to the `MM/DD/YYYY` format so it can properly compare against the `{date_mdy}` Merge Tag, which pulls the current date (today).

It's also possible to compare **any** date field using GravityView's [:timestamp](https://www.gravitykit.com/docs/gravityview/merge-tags/merge-tag-modifiers/#timestamp) modifier against Gravity Forms' [{today:timestamp}](https://docs.gravityforms.com/today-merge-tags/#h-timestamp) Merge Tag.

Example: 

The  shortcode does not support [relative dates](https://www.gravitykit.com/docs/gravityview/filter-and-sort-results/using-relative-start-dates-and-end-dates/); however, [field conditional logic](https://www.gravitykit.com/docs/gravityview-pro/advanced-filter/field-conditional-logic/) does.

We also used some CSS classes to style each status according to their urgency:

```
.gk-task-on-time{	background-color: green;}
```

```
.gk-task-on-time{	background-color: green;}
```

Here's our View:

![Task list highlighting statuses: On Time, Expiring Soon, Expired. "Dev Meeting" expires today](https://www.gravitykit.com/wp-content/uploads/2025/10/file-6fK6SxdzBG.png)
*Amazing, right?!*
We can also enhance our View by showing [Dashicons](https://developer.wordpress.org/resource/dashicons/#businessman) instead of texts for each status. We just need to replace the CSS classes used and remove the texts:

```
[gvlogic if="{Task Due Date:3:mdy}" less_than="{date_mdy}"]    [/gvlogic][gvlogic if="{Task Due Date:3:mdy}" is="{date_mdy}"]    [/gvlogic][gvlogic if="{Task Due Date:3:mdy}" greater_than="{date_mdy}"]    [/gvlogic]
```

```
[gvlogic if="{Task Due Date:3:mdy}" less_than="{date_mdy}"]    [/gvlogic][gvlogic if="{Task Due Date:3:mdy}" is="{date_mdy}"]    [/gvlogic][gvlogic if="{Task Due Date:3:mdy}" greater_than="{date_mdy}"]    [/gvlogic]
```

And here's the resulting View:

![To-do list showing task descriptions, due dates, and statuses, highlighting tasks due today](https://www.gravitykit.com/wp-content/uploads/2025/10/file-fifN0WW06S.png)