Add Months With the End-of-Month Rule screenshot

Add Months With the End-of-Month Rule

Shift a date by whole months, keeping the month's last day as the last day and refusing a day the target month does not have.

Privacy First
0 Runs
Updated 2026-11-22
Runs in your browser
States its rule
Nothing uploaded

What this Add Months With the End-of-Month Rule calculator does

Shift a date by whole months, keeping the month's last day as the last day and refusing a day the target month does not have.

If the date you enter is the last day of its month, the answer is the last day of the target month, so 31 January plus one month is 28 or 29 February. Otherwise the day of the month is kept, and if the target month is too short the page refuses and names its last day instead of silently moving the date. Counted on civil dates at midnight, so no clock reading can shift it. The Gregorian leap rule is read rather than assumed - February has 29 days when the year is divisible by 4 and not by 100, or when it is divisible by 400 - so a leap year moves no count here by hand.

How to use it

Enter Start date, Months to add, then press Calculate. The page recalculates as you type and runs the same operation again from the values on screen.

Worked example

Input:

Start date = 2026-01-31
Months to add = 1

Output:

Shifted date = 2026-02-28
Weekday = Saturday
Rule applied = end of month

Why it runs in your browser

Every date is read as a civil date in this browser's local time zone: the page carries no time-zone database and no locale data, and nothing you type is sent anywhere.

Add Months With the End-of-Month Rule: Shift a date by whole months, keeping the month's last day as the last day and refusing a day the target month does not have.

If the date you enter is the last day of its month, the answer is the last day of the target month, so 31 January plus one month is 28 or 29 February. Otherwise the day of the month is kept, and if the target month is too short the page refuses and names its last day instead of silently moving the date. Counted on civil dates at midnight, so no clock reading can shift it. The Gregorian leap rule is read rather than assumed - February has 29 days when the year is divisible by 4 and not by 100, or when it is divisible by 400 - so a leap year moves no count here by hand.

Worked example: Start date = 2026-01-31, Months to add = 1 gives Shifted date = 2026-02-28; Weekday = Saturday; Rule applied = end of month.

How to use the Add Months With the End-of-Month Rule calculator

Enter Start date, Months to add, then press Calculate. The page recalculates as you type and runs the same operation again from the values on screen.

Every date is read as a civil date in this browser's local time zone: the page carries no time-zone database and no locale data, and nothing you type is sent anywhere.

  • Start date — a date written YYYY-MM-DD
  • Months to add — a whole number

The rule this page applies

If the date you enter is the last day of its month, the answer is the last day of the target month, so 31 January plus one month is 28 or 29 February. Otherwise the day of the month is kept, and if the target month is too short the page refuses and names its last day instead of silently moving the date. Counted on civil dates at midnight, so no clock reading can shift it. The Gregorian leap rule is read rather than assumed - February has 29 days when the year is divisible by 4 and not by 100, or when it is divisible by 400 - so a leap year moves no count here by hand.

A year is a leap year when it is divisible by 4, except a century, which is a leap year only when divisible by 400. February therefore has 29 days in 2028 and 28 in 2026, and the page reads the real month length rather than a table.

  • Shifted date = 2026-02-28
  • Weekday = Saturday
  • Rule applied = end of month

What to Expect

Best for

  • Checking a date by hand
  • Getting the shifted date quickly
  • Comparing two candidate dates

Not ideal for

  • Statutory holiday calendars
  • Time-zone conversion
  • Locales other than English

What this tool keeps

  • Your inputs in this tab
  • The rule, printed in full
  • The same answer on every run

What may need cleanup

  • A date the page refuses, which names the reason instead of guessing
  • A count outside the supported range, which is refused by name

Common errors

  • A date that does not exist, such as 30 February, is refused rather than rolled forward
  • A blank field is refused rather than read as today
  • A written date in an order the page does not accept is refused by name

Example use cases

  • Planning around a deadline
  • Checking a date before you commit to it
  • Homework and exam checking

Sample input

Start date = 2026-01-31, Months to add = 1

Sample output

Shifted date = 2026-02-28; Weekday = Saturday; Rule applied = end of month

Who this is for

  • Anyone checking a date by hand
  • Students and teachers

Frequently asked questions

What does the Add Months With the End-of-Month Rule calculator do?

Shift a date by whole months, keeping the month's last day as the last day and refusing a day the target month does not have. The page prints shifted date, weekday, rule applied.

How does this page count days?

If the date you enter is the last day of its month, the answer is the last day of the target month, so 31 January plus one month is 28 or 29 February. Otherwise the day of the month is kept, and if the target month is too short the page refuses and names its last day instead of silently moving the date. Counted on civil dates at midnight, so no clock reading can shift it. The Gregorian leap rule is read rather than assumed - February has 29 days when the year is divisible by 4 and not by 100, or when it is divisible by 400 - so a leap year moves no count here by hand.

How are leap years handled?

A year is a leap year when it is divisible by 4, except a century, which is a leap year only when divisible by 400. February therefore has 29 days in 2028 and 28 in 2026, and the page reads the real month length rather than a table.

Which time zone does the page use?

Every date is read as a civil date in this browser's local time zone: the page carries no time-zone database and no locale data, and nothing you type is sent anywhere.

Why does 31 January plus one month become 28 February?

Because the start date is the last day of its month, and the end-of-month rule keeps it at the end of the target month. February's last day is the 28th in 2026 and the 29th in a leap year.

What about 30 January plus one month?

It is refused: 30 January is not the last day of January, so the day is kept, and February has no 30th. The page names the last day available instead of quietly moving the date.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.