# time\_add

Adds a specified amount of time to a date. Returns the result as an ISO 8601 string.

```liquid
{% assign tomorrow = "now" | time_add: 1, "days" %}
{% log tomorrow %}
```

#### Syntax

```liquid
{{ date | time_add: amount, unit }}
```

| Parameter | Description                                                                                |
| --------- | ------------------------------------------------------------------------------------------ |
| `date`    | Starting date — a date string, `"now"`, or `"today"`                                       |
| `amount`  | Number of units to add                                                                     |
| `unit`    | Time unit: `"years"`, `"months"`, `"weeks"`, `"days"`, `"hours"`, `"minutes"`, `"seconds"` |

#### Return Value

Returns a string in `YYYY-MM-DDTHH:mm:ss` format.

#### Examples

**Add days:**

```liquid
{% assign delivery_date = order.created_at | time_add: 5, "days" %}
{% log "Expected delivery: " | append: delivery_date %}
```

**Add hours from now:**

```liquid
{% assign expires_at = "now" | time_add: 24, "hours" %}
{% log "Expires at: " | append: expires_at %}
```

**Add months:**

```liquid
{% assign renewal_date = subscription.start_date | time_add: 1, "months" %}
{% log "Renewal: " | append: renewal_date %}
```

**Schedule a follow-up:**

```liquid
{% assign followup_date = order.created_at | time_add: 2, "weeks" %}
{% log "Follow-up scheduled for: " | append: followup_date %}
```

**Calculate an expiration date and format it:**

```liquid
{% assign expiry = "now" | time_add: 30, "days" %}
{% assign formatted = expiry | date: "%B %d, %Y" %}
{% log "Offer expires: " | append: formatted %}
```

Output:

```
Offer expires: March 23, 2025
```

**Combine with in\_timezone:**

```liquid
{% assign future = "now" | time_add: 3, "hours" | in_timezone: shop.timezone %}
{% log future %}
```

#### Notes

* Accepts `"now"` or `"today"` as the current date/time
* The output format is always `YYYY-MM-DDTHH:mm:ss` — use the `date` filter to reformat
* See also: `time_subtract`, `in_timezone`
