> For the complete documentation index, see [llms.txt](https://docs.foodcore.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.foodcore.io/recipes/shelf-life.md).

# Shelf life & date labels

Instead of working out and typing a use-by or best-before date every time you print a label, you can set a shelf life once on the recipe and let FoodCore fill the date in for you.

## Set the shelf life

Go to **Recipes**, open the recipe you want, and open the **Overview** tab. **Find** the shelf-life card, sat just under prep time.

**Enter** a number of days, and **choose** whether that's a **use-by** or a **best-before** date:

* **Use-by** — for perishable food where safety depends on the date.
* **Best-before** — for food where quality, not safety, is the concern past that date.

Save the recipe once set.

This is **ambient shelf life** — how long the product keeps at room temperature. FoodCore doesn't model separate chilled or frozen shelf-life variants; if you sell a product both fresh and frozen with different keeping times, the shelf-life field reflects the ambient figure only.

## How it fills the label

In the label designer, when you **pick a recipe** with a shelf life set, the date block on the label is filled in automatically as **today + the number of days** you set, using whichever date type (use-by or best-before) you chose on the recipe.

## Picking a recipe overwrites the date — typing one doesn't

This is the behaviour worth understanding before you rely on it:

* **Picking a recipe** in the label designer always fills — and overwrites — the date field with today + shelf life, even if a date was already there.
* **Typing a date in by hand**, or re-rendering a label that already has a recipe attached, does **not** touch a date you've already typed. Your manual edit survives.

So if you need a one-off date that's different from the standard shelf life — a longer date for a special batch, say — **set the recipe first, then edit the date afterwards**. If you edit the date first and then change the recipe, the recipe pick will overwrite what you typed.

## What's next

* [Generate a label from a recipe](https://docs.foodcore.io/labels/create-label.md)
* [Prep / shelf-life day dot labels](https://docs.foodcore.io/labels/date-labels.md)
* [All available label blocks](https://docs.foodcore.io/labels/blocks.md)
* [Create a recipe](https://docs.foodcore.io/recipes/create-recipe.md)
