Возраст в месяцах — генератор карточки

Рассчитайте количество месяцев и скачайте милую карточку.

// about

Об этом инструменте

Введите имя и дату рождения, и инструмент создаст забавную открытку с возрастом в календарных месяцах. Идея пришла из милой фразы, которую родители говорят о малышах, даже если число получается очень большим.

Как использовать

  1. Введите имя и дату рождения.
  2. Выберите дату отсчёта и нажмите кнопку с месяцами.
  3. Скачайте открытку или скопируйте фразу, чтобы поделиться.

Зачем используют этот инструмент

  • Весёлый способ поделиться днями рождения и месячными вехами с семьёй и друзьями.
  • Создаёт готовое к скачиванию изображение и фразу, которую можно скопировать.
  • На открытке указана дата отсчёта, поэтому результат легко понять.
Руководства · Дата и время · 8 мин чтения

Расчёт дат без ошибки на один день: обратный отсчёт, памятные даты, возраст и возраст в месяцах

Сколько дней до экзамена? Когда наступит сотый день? Сколько месяцев малышу? В расчётах дат на каждом шагу возникает разница в один день, поэтому важно знать, по какому правилу ведётся счёт.

В обратном отсчёте целевую дату обозначают D, день до неё — D-1, а следующий день — D+1. Оставшиеся дни — это просто целевая дата минус сегодня. 28 октября 2026 года до 25 декабря остаётся D-58.

Начало: 2026-03-01
Прошло дней: 2026-06-08 — через 99 дней после начала
День по счёту: 2026-06-08 — сотый день
Считать ли первый день: обратный отсчёт, памятные даты, возраст в годах и месяцах и концы месяцев без ошибки на один день.
Читать →
Сделать с ИИ

Создайте этот инструмент сами с помощью ИИ

Нужна своя версия? Скопируйте промпт в чат с ИИ или сохраните файл навыка для ИИ-агента. В них описаны функции, особые случаи и тесты, которые мы использовали.

Промпт и навык даны на английском — ИИ-инструменты хорошо его понимают.

Промпт-задание для ИИ

Вставьте как есть в Claude, ChatGPT или Gemini.

You are an experienced full-stack web developer. Build a web tool called "Генератор карточки возраста в месяцах" that meets the requirements below.

## Goal

Build a tool that calculates age in calendar months from a name and birth date and creates a shareable card image.

## Core features

- Calendar-month age
- Choose the reference date (default today)
- Generate a sentence such as 'Alex is 18 months old'
- Download the card as SVG/PNG
- Copy the sentence

## Inputs

- Name
- Birth date
- Reference date

## Outputs

- Age in months
- Share sentence
- Card image

## Edge cases and handling rules

- Subtract one month if the reference day is before the birth day
- Error when the reference date is before the birth date
- Document the rule for birthdays on the 31st
- Keep the card layout intact with long names

## Implementation requirements

- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.
- Make the UI responsive and easy to use on mobile; label every input and keep everything keyboard accessible.
- Add a Copy button for results and show clear, friendly error messages for invalid input.
- Keep the core logic in functions separate from the UI so it can be unit-tested.

## Definition of done (test cases)

- Born 1975-10-22, reference 2026-08-12 → 609 months
- Born 15 May: 0 months on 14 June, 1 month on 15 June
- The downloaded image contains the name and months

First outline your implementation plan in at most five lines, then write the complete code, and finally explain how to check the test cases above.

Навык (SKILL.md)

Сохраните как .claude/skills/build-baby-age-calculator/SKILL.md, чтобы агенты вроде Claude Code использовали его при каждой доработке инструмента.

---
name: build-baby-age-calculator
description: Use when building or changing a Генератор карточки возраста в месяцах tool. Build a tool that calculates age in calendar months from a name and birth date and creates a shareable card image.
---

# Build: Генератор карточки возраста в месяцах

## Goal

Build a tool that calculates age in calendar months from a name and birth date and creates a shareable card image.

## Workflow

1. Review the required features, inputs and outputs below and ask about anything missing first.
2. Implement the core logic as pure functions separate from the UI.
3. Check the logic against the test cases in the verification list.
4. Build a responsive UI with an input form, a result area and a Copy button.
5. Reproduce each edge case listed under Rules and refine the error messages.

## Core features

- Calendar-month age
- Choose the reference date (default today)
- Generate a sentence such as 'Alex is 18 months old'
- Download the card as SVG/PNG
- Copy the sentence

## Inputs

- Name
- Birth date
- Reference date

## Outputs

- Age in months
- Share sentence
- Card image

## Rules

- Subtract one month if the reference day is before the birth day
- Error when the reference date is before the birth date
- Document the rule for birthdays on the 31st
- Keep the card layout intact with long names
- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.

## Verification

- [ ] Born 1975-10-22, reference 2026-08-12 → 609 months
- [ ] Born 15 May: 0 months on 14 June, 1 month on 15 June
- [ ] The downloaded image contains the name and months

Советы по работе с ИИ

  • Укажите стек (React, Vue или чистый HTML) в первой строке, чтобы код подошёл к проекту.
  • Попросите ИИ выполнить перечисленные тесты и показать результаты до принятия кода.
  • Не вставляйте настоящие пароли, данные клиентов и API-ключи; используйте примеры.