---
title: "Date and time conditions: schedule sales and happy hours"
description: "Pricepep Date & Time conditions: date, time, date & time, days of week, days of month and months, in your site's timezone. Schedule sales and happy hours."
url: "https://pricepep.com/docs/date-time-conditions/"
updated: "2026-12-02"
category: Conditions
---

# Date and time conditions: schedule sales and happy hours

Date & Time conditions **schedule rules**: run a sale between two dates, a happy hour between two times, a weekend price, or a deal on the first day of each month. They use the **timezone of your site** (**Settings > General > Timezone** in WordPress).

Each condition compares one thing, and all conditions of a rule must match. For a period, add two conditions: **Date** "from" and **Date** "to" (or **Date & time** "from" and "to"). Weeks start on the day set in **Settings > General > Week Starts On** in WordPress. When display prices in the shop are changed by rules, cached shop prices expire when a Date & Time condition of a rule starts or stops matching.

## Where can you use these conditions?

| Condition | Product pricing | Cart discounts | Checkout fees |
| --- | --- | --- | --- |
| Date | Conditions | Conditions | Conditions |
| Time | Conditions | Conditions | Conditions |
| Date & time | Conditions | Conditions | Conditions |
| Days of week | Conditions | Conditions | Conditions |
| Days of month | Conditions | Conditions | Conditions |
| Months | Conditions | Conditions | Conditions |

## Date & Time conditions

Date & Time conditions use the current date and time in the site's timezone (Settings > General > Timezone in WordPress).

### Date

Today's date.

- **Fields:** Date (date picker)
- **Operators:** "from", "to", "specific date"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Two conditions, Date from 2026-11-27 and Date to 2026-11-30, for a sale from 27 to 30 November.
- "to" includes the whole day.
- The Countdown Timer promotion tool uses the end date. Since 2.6.0, `{{start_date}}` and `{{end_date}}` in Product Banners and public descriptions show the dates of the Date and Date & time conditions (see [the sale dates](/docs/product-banners/#how-do-i-show-the-dates-of-a-sale)).

### Time

The time of day.

- **Fields:** Time (time picker)
- **Operators:** "from", "to"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Time from 09:00 and Time to 12:00 for a morning happy hour.
- "from" includes the minute, "to" stops just before it; to 00:00 means until the end of the day.
- A window across midnight (22:00 to 02:00) needs two rules, because all conditions of a rule must match.

### Date & time

The current date and time.

- **Fields:** Date and time (picker)
- **Operators:** "from", "to"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Date & time from 2026-11-27 00:00 and Date & time to 2026-11-30 23:59 for Black Friday to Cyber Monday.
- The Countdown Timer promotion tool counts down to the "to" date and time.
- A "to" at 00:00 ends the rule as that day starts, so `{{end_date}}` shows the day before (see [the sale dates](/docs/product-banners/#how-do-i-show-the-dates-of-a-sale)).

### Days of week

The day of the week.

- **Fields:** Days of week
- **Operators:** "in list", "not in list"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Days of week in list Saturday, Sunday for a weekend price.

### Days of month

The day of the month (1 to 31, and "last day").

- **Fields:** Days of month (1 to 31 and "last day")
- **Operators:** "in list", "not in list"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Days of month in list 1 for a first-of-the-month deal (see [a sale on the same days every month](/docs/can-i-run-a-sale-on-the-same-days-every-month/)).
- "last day" matches the last day of any month (28, 29, 30 or 31).
- The Countdown Timer promotion tool counts down to the start of the first day that isn't selected.

### Months

The month.

- **Fields:** Months
- **Operators:** "in list", "not in list"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Months in list December for a holiday price.
- The Countdown Timer promotion tool counts down to the first day of the first month that isn't selected.

## What do the operators mean?

| Operator | Matches when |
| --- | --- |
| from | Today is on or after the date. |
| to | Today is on or before the date (the whole day counts). |
| specific date | Today is the date. |

| Operator | Matches when |
| --- | --- |
| from | The time now is the time or later. |
| to | The time now is before the time (to 00:00 means until midnight at the end of the day). |

| Operator | Matches when |
| --- | --- |
| from | Now is the date and time or later. |
| to | Now is the date and time or earlier. |

| Operator | Matches when |
| --- | --- |
| in list | Matches when the value is one of the selected items (for values with several items, such as the categories of a product: when at least one of them is selected). |
| not in list | Matches when none of the values is selected, including when there is no value at all (for example a guest for Customer, or a simple product for Product variation). |

## Related

- [How conditions work](/docs/conditions-overview/)
- [Countdown Timer](/docs/countdown-timer/)
- [Product pricing rules](/docs/product-pricing/)
- [Cart discounts](/docs/cart-discounts/)

## Frequently asked questions

### Which timezone do date and time conditions use?

The timezone in WordPress Settings > General.

### How do I schedule a Black Friday sale?

Add two conditions to the rule: Date & time from the start and Date & time to the end. The rule applies only in between.

### Can I show a countdown until the sale ends?

Yes. Turn on the Countdown Timer promotion tool: it counts down to the end set by your Date, Time, Date & time, Days of week, Days of month or Months conditions.

### How do I make a happy hour from 22:00 to 02:00?

Use two rules: one with Time from 22:00, one with Time to 02:00. One rule can't span midnight because all its conditions must match.

### Can customers see the dates of a sale?

Yes, since 2.6.0: the {{start_date}} and {{end_date}} macros in Product Banners and in a rule's Description - Public show the first and last day set by its Date and Date & time conditions.

## Related articles

- [Conditions in Pricepep: how they work and combine](https://pricepep.com/docs/conditions-overview/)
- [Countdown Timer for time-limited offers](https://pricepep.com/docs/countdown-timer/)
- [Product pricing rules in WooCommerce: how they work](https://pricepep.com/docs/product-pricing/)
- [Cart discounts: automatic discounts in the WooCommerce cart](https://pricepep.com/docs/cart-discounts/)

All articles in [Conditions](https://pricepep.com/docs-category/conditions/)
