{"id":20020608,"url":"https://github.com/sleavely/next-monthly","last_synced_at":"2026-05-14T22:34:16.910Z","repository":{"id":143508648,"uuid":"528040902","full_name":"Sleavely/next-monthly","owner":"Sleavely","description":"Determine the next monthly occurence of a JS date, falling back on the last day of the month","archived":false,"fork":false,"pushed_at":"2023-04-09T21:35:33.000Z","size":321,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-12T16:12:28.225Z","etag":null,"topics":["dates","javascript","monthly","nodejs","recurring-payments"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sleavely.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-23T14:59:17.000Z","updated_at":"2023-10-02T06:34:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"2d0d6d47-5b1e-40fa-ba34-e1b9356a0043","html_url":"https://github.com/Sleavely/next-monthly","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sleavely%2Fnext-monthly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sleavely%2Fnext-monthly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sleavely%2Fnext-monthly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sleavely%2Fnext-monthly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sleavely","download_url":"https://codeload.github.com/Sleavely/next-monthly/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241454525,"owners_count":19965405,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dates","javascript","monthly","nodejs","recurring-payments"],"created_at":"2024-11-13T08:33:13.859Z","updated_at":"2026-05-14T22:34:11.891Z","avatar_url":"https://github.com/Sleavely.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# next-monthly\n\nDetermine the next monthly occurence, falling back on the last day of the month.\n\n[ ![npm version](https://img.shields.io/npm/v/next-monthly.svg?style=flat) ](https://npmjs.org/package/next-monthly \"View package\")\n[ ![CI status](https://github.com/Sleavely/next-monthly/actions/workflows/node.js.yml/badge.svg) ](https://github.com/Sleavely/next-monthly/actions/workflows/node.js.yml \"View workflow\")\n\n## Installation\n\n```sh\nnpm i next-monthly\n```\n\n## Usage\n\n```js\nconst nextMonthly = require('next-monthly')\n\n// Jan 31, Feb 28 or 29, etc.\nconst lastDayOfThisMonth = nextMonthly()\n\n// If you want to charge users who signed up on the 30th (but sometimes on Feb 28, etc.)\nconst nextBillingDate = nextMonthly({\n  from: '1990-01-07T01:29:03.999Z',\n\n  // Defaults to Date.now(). Only used here for demo purpose:\n  now:  '2022-08-23T12:29:08.551Z',\n})\n// Date: 2022-09-07T01:29:03.999Z\n```\n\n## Options\n\n| **Property** | **Description** |\n|---|---|\n| `from` | The basis for the monthly occurrance. Defaults to `0000-01-31T00:00:00.000Z` for a classic last-day-of-month experience. |\n| `now` | The point in time from which to look for the next occurance. Defaults to `Date.now()`. |\n\n## See also\n\n* [rrule](https://www.npmjs.com/package/rrule) - Library for working with recurrence rules for calendar dates according to RFC 5545.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleavely%2Fnext-monthly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsleavely%2Fnext-monthly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleavely%2Fnext-monthly/lists"}