---
title: Sitewide sale prices from a calendar file
url: https://namegarage.com/blog/sitewide-sale-prices
author: Namegarage
date: '2026-11-19'
description: A sale calendar sets sitewide buy-now discounts by date. Checkout, search
  and the priced API answers compute the sale price from the regular price and the
  server clock.
ai-disclosure: ai-assisted
---

# Sitewide sale prices from a calendar file

This article was prepared with AI assistance and reviewed by a person before publication.

Release `2026-11-19-sitewide-sale-prices` adds a sale calendar to Namegarage. One configuration file lists each promo with its start, its end and its discount. The site selects the active promos by the server clock, so a promo starts and ends without a deploy. The 2026 calendar schedules six holiday promotions. See the [holiday sale announcement](/blog/2026-holiday-domain-sale) for the dates and donation terms.

## One price function

Every page, checkout and API answer already prices a name with one function, `dealPrice`, in `money.js`. That function now takes the calendar as an optional third argument. It returns the weekly deal price while a weekly deal is live, the scheduled price while a price drop is active, and otherwise the regular price less the total sale percent. The total is the largest active `percent` plus every active `bonus`.

The sale price is rounded half-up to the nearest $10 in integer arithmetic, raised to the name's Floor (65% of the regular price) and never above the regular price. Python and JavaScript share the rule and its test vectors.

## Where the calendar travels

The build validates the calendar and writes it into `_catalog.json` under `_meta.sale`. The checkout and search Functions read it from the same pinned catalog they already verify, so a page and its checkout use one calendar. A malformed calendar refuses the purchase with HTTP 503; an absent one means no sale. An open tab pairs new catalog rows with the calendar from the same build. Checkout asks the buyer to confirm if the displayed price changed.

## What keeps the regular price

Leases, `lease_base_price_usd`, minimum offers and signed or accepted amounts keep the regular price. `domains.json` keeps `buy_now` as the regular price and gains no field. During a sale, a bundle discount or a coupon still applies, but each name's amount stops at its Floor.

## What changes for clients

No field, type or tool changes. During a sale, `price_usd` is the sale price and `regular_price_usd` is present, the two fields that already report a weekly deal. SDK 0.3.2 and catalog skill 1.3.2 keep their versions.
