# Days until the 30th

Counts the days from today, or any date you choose, to the next 30th of a month, with its date and the 30th after it.

- Page: https://www.acalculator.org/days/days-until-the-30th
- JSON spec: https://www.acalculator.org/days/days-until-the-30th.json
- Version: ade5937eac8e

## Default answer

Example with the default inputs (Count from October 19, 2026) on the example date Monday, October 19, 2026: From October 19, 2026, there are 11 days until the 30th, Friday, October 30, 2026.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| from | Count from | The date to count from. Today, unless you change it. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| days | Days until the 30th | Whole days from the start date to the next 30th of a month; 0 when the start date is the 30th. |
| date | Next 30th | The first date on or after the start date that is the 30th of its month. |
| after | The 30th after | The next 30th after that date. |

## Method

Find the first date on or after the start date that is the 30th of its month, skipping months that have no 30th, then count the days from the start date to it.

## Assumptions

- On the 30th, the count is 0, and the 30th after is the 30th of the next month that has one.
- February has no 30th, so the count skips to the 30th of the next month that has one. A leap year is a year divisible by 4, except a century year not divisible by 400 (2000 and 2400 are leap years; 1900 and 2100 are not).
- The start date itself is not counted: from the day before, the count is 1.
- Dates are calendar days with no time of day, so a time zone or a daylight-saving change never adds or loses a day.
- Start dates from January 1, 1900 to December 31, 2400 work.

## Worked examples

1. from = 2026-10-19 gives date = 2026-10-30, days = 11, after = 2026-11-30. Source: IETF RFC 3339, section 5.7 (days in each month) and Appendix C (the leap year rule) (https://www.rfc-editor.org/rfc/rfc3339).
2. from = 2026-12-31 gives date = 2027-01-30, days = 30, after = 2027-03-30. Source: IETF RFC 3339, section 5.7 (days in each month) and Appendix C (the leap year rule) (https://www.rfc-editor.org/rfc/rfc3339).
3. from = 2027-02-01 gives date = 2027-03-30, days = 57, after = 2027-04-30. Source: IETF RFC 3339, section 5.7 (days in each month) and Appendix C (the leap year rule) (https://www.rfc-editor.org/rfc/rfc3339).
4. from = 2028-02-15 gives date = 2028-03-30, days = 44, after = 2028-04-30. Source: IETF RFC 3339, section 5.7 (days in each month) and Appendix C (the leap year rule) (https://www.rfc-editor.org/rfc/rfc3339).
5. from = 2027-01-30 gives date = 2027-01-30, days = 0, after = 2027-03-30. Source: IETF RFC 3339, section 5.7 (days in each month) and Appendix C (the leap year rule) (https://www.rfc-editor.org/rfc/rfc3339).

## FAQ

### How many days until the 30th?

It depends on the date, so the count above starts from today as your device shows it. From the 1st of a month that has a 30th, it is 29 days away; on the 30th itself the count is 0. Change “Count from” to count from another date.

### What if today is the 30th?

Then the count is 0, because the next 30th on or after today is today itself. The page also shows the 30th after it, which is 30 to 60 days later.

### Which months have a 30th?

Every month except February, which has 28 days, or 29 in a leap year.

### How many times does the 30th come in a year?

11, one in every month except February.

### What about February?

February has no 30th, so from February 1 the next 30th is March 30: 57 days away in a common year and 58 in a leap year.

### How are the days until the 30th counted?

From the start date (today, unless you change it) to the next 30th, without counting the start date, in calendar days. Weekends and holidays count like any other day.

## Sources

- IETF RFC 3339, Date and Time on the Internet: Timestamps, section 5.7 (the days in each month) and Appendix C (the leap year rule). https://www.rfc-editor.org/rfc/rfc3339
- U.S. Naval Observatory, Leap Years: the Gregorian leap year rule. https://aa.usno.navy.mil/faq/leap_years
