{"id":20513728,"url":"https://github.com/webreflection/monthly","last_synced_at":"2025-03-05T23:14:36.918Z","repository":{"id":57302651,"uuid":"145432515","full_name":"WebReflection/monthly","owner":"WebReflection","description":"A simplified way to show a calendar month in any console.","archived":false,"fork":false,"pushed_at":"2023-06-28T08:23:18.000Z","size":584,"stargazers_count":36,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-17T12:17:46.867Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WebReflection.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2018-08-20T15:01:17.000Z","updated_at":"2023-06-28T08:23:23.000Z","dependencies_parsed_at":"2024-02-01T16:41:39.759Z","dependency_job_id":null,"html_url":"https://github.com/WebReflection/monthly","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fmonthly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fmonthly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fmonthly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fmonthly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebReflection","download_url":"https://codeload.github.com/WebReflection/monthly/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242117718,"owners_count":20074438,"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":[],"created_at":"2024-11-15T21:12:50.988Z","updated_at":"2025-03-05T23:14:36.890Z","avatar_url":"https://github.com/WebReflection.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# monthly [![Build Status](https://travis-ci.com/WebReflection/monthly.svg?branch=master)](https://travis-ci.com/WebReflection/monthly) [![Coverage Status](https://coveralls.io/repos/github/WebReflection/monthly/badge.svg?branch=master)](https://coveralls.io/github/WebReflection/monthly?branch=master) [![License: ISC](https://img.shields.io/badge/License-ISC-yellow.svg)](https://opensource.org/licenses/ISC)\n\nA simplified way to show a calendar month in any console.\n\n### API / Signature\n\nThe exported module is a function that accepts an object with the following properties:\n\n  * `date`: the _mandatory_ date object to use in order to display the month\n  * `startDay`: the _optional_ day of the week to use as starting day, by default it's `1` ([Monday](https://github.com/WebReflection/monthly#about-days))\n  * `freeDay`: one or more _optional_ days of the week to consider free, by default `[0, 6]` ([Sunday](https://github.com/WebReflection/monthly#about-days), [Saturday](https://github.com/WebReflection/monthly#about-days))\n  * `locale`: the _optional_ locale to use, by default `en`\n  * `table`: an _optional_ boolean value to indicate the layout should be a proper table, by default it's `false`\n  * `year`: an _optional_ boolean value to indicate if the month name should be followed the date year, by default it's `false`\n  * `highlight`: an _optional_ day of the month, eventually as list, to highlight. By default it's the current date.\n  * `blink`: an _optional_ day of the month, eventually as list, to show blinking, where possible. By default it's an empty list\n  * `bold`: an _optional_ day of the month, eventually as list, to show as bold, where possible. By default it's an empty list\n  * `dim`: an _optional_ day of the month, eventually as list, to show dimmed, where possible. By default it's an empty list\n  * `underline`: an _optional_ day of the month, eventually as list, to show underlined, where possible. By default it's an empty list\n\n\n### About Days\n\nThe `date.getDay()` method returns `0` for _Sunday_, `1` for _Monday_, and all other days 'till `6` for _Saturday_.\n\nBoth `startDay` and `freeDay` use this numeric convention for days of the week, but every other property uses the actual day of the month, which is never `0` or greater than `31`.\n\nYou can also pass just dates objects for every other field that is not `startDay` or `freeDay`, the function will convert those automatically.\n\n\n### Usage Example\n\n```js\n// import monthly from 'monthly';\n// or ...\nvar monthly = require('monthly');\n\nvar rows = monthly({\n  date: new Date,\n  startDay: 1,\n  freeDay: [0, 6],\n  locale: 'en',\n  highlight: [3, 9, 11, 20],\n  blink: 9,\n  bold: 10,\n  dim: 28,\n  underline: 12,\n  table: false,\n  year: false\n});\n\nconsole.log(rows.join('\\n'));\n```\n\nPlease note the function returns an array, so that it's possible to stack more months per row as shown via `npm test`.\n\n### As CLI\n\n```\nUsage: monthly [options]\n\nOptions:\n\n  --holidays \u003ccc\u003e    dim holidays for an ISO 3166 country (de gb it us) and underline if national.\n  -m, --month \u003cmm\u003e   display a calendar for the month. (default: 8)\n  -y, --year [yyyy]  display a calendar for the whole year. (default: 2018)\n  -s, --sunday       display Sunday as the first day of the week.\n  -3, --three        display three months spanning the date.\n  -v, --version      output the version number\n  -h, --help         output usage information\n```\n\nPlease note the ISO 3166 country must be available in this repository.\n\nIf not available, `--holidays` won't have any meaning so please file PRs if you'd like your country vacations listed in here, following this [example file](https://github.com/WebReflection/monthly/blob/master/holidays/.example/index.js), thanks.\n\n\n### Screenshot\n\n![the whole year in console](./screenshot.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebreflection%2Fmonthly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebreflection%2Fmonthly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebreflection%2Fmonthly/lists"}