{"id":15620454,"url":"https://github.com/jinliming2/calendar-js","last_synced_at":"2025-10-16T02:44:25.477Z","repository":{"id":113200601,"uuid":"64604015","full_name":"jinliming2/Calendar-js","owner":"jinliming2","description":"A Calendar Library Written in Javascript, with Web Components v1, ECMAScript 6 (2015+) and CSS3.","archived":false,"fork":false,"pushed_at":"2019-01-28T15:42:18.000Z","size":89,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-22T17:04:57.566Z","etag":null,"topics":["calendar","css3","es6","html5","shadow-dom","web-components"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jinliming2.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":"2016-07-31T16:34:12.000Z","updated_at":"2023-07-19T00:57:18.000Z","dependencies_parsed_at":"2023-03-27T15:05:54.893Z","dependency_job_id":null,"html_url":"https://github.com/jinliming2/Calendar-js","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinliming2%2FCalendar-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinliming2%2FCalendar-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinliming2%2FCalendar-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinliming2%2FCalendar-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jinliming2","download_url":"https://codeload.github.com/jinliming2/Calendar-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251320405,"owners_count":21570571,"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":["calendar","css3","es6","html5","shadow-dom","web-components"],"created_at":"2024-10-03T09:01:22.072Z","updated_at":"2025-10-16T02:44:20.436Z","avatar_url":"https://github.com/jinliming2.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Calendar-js\n[![Testing](https://img.shields.io/badge/Calendar--js-Testing-yellow.svg)](https://github.com/jinliming2/Calendar-js)\n[![GitHub license](https://img.shields.io/badge/license-AGPL-blue.svg)](https://raw.githubusercontent.com/jinliming2/Calendar-js/master/LICENSE)\n[![GitHub stars](https://img.shields.io/github/stars/jinliming2/Calendar-js.svg)](https://github.com/jinliming2/Calendar-js/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/jinliming2/Calendar-js.svg)](https://github.com/jinliming2/Calendar-js/network)\n[![GitHub issues](https://img.shields.io/github/issues/jinliming2/Calendar-js.svg)](https://github.com/jinliming2/Calendar-js/issues)\n\nAn Calendar library written in JS, based on Web Components v1, ES6(ES2015+) and CSS3.\n\n一个使用 JS 编写的日历库，遵循 Web Components v1 + ES6(ES2015+) + CSS3 标准\n\n### [Demo 呆萌](https://jinliming2.github.io/Calendar-js/demo.html)\n\n### Before Use 写在前面\nThis Library is based on ES6 and CSS3, so it just work well in newer browsers.\n\n这个类库的开始就是以 ES6 + CSS3 为基础的，不对旧版本浏览器进行兼容，在新版本的浏览器中可以直接使用。\n\n\u003e \u003cspan style=\"font-size: 22px; font-weight: bold; color: orange;\"\u003eThis Library is based on Web Components v1, so it's can only work on Chrome 54+, Firefox 63+, Opera 41+, Safari 10.1, and if you want to use it on Firefox 50+, you must go to [about:config](about:config) and turn on the switch named *dom.webcomponents.customelements.enabled* and *dom.webcomponents.shadowdom.enabled*.\u003c/span\u003e\n\n\u003e \u003cspan style=\"font-size: 22px; font-weight: bold; color: orange;\"\u003e使用到 Web Components v1 技术，目前 Chrome 54+、Firefox 63+、Opera 41+、Safari 10.1 可以直接使用，FireFox 50+ 需要在 [about:config](about:config) 中开启 *dom.webcomponents.customelements.enabled* 和 *dom.webcomponents.shadowdom.enabled* 开关才可以使用。\u003c/span\u003e\n\n***This is the first time I try to write documents in English, please tell me if I have any syntax error, Thanks!***\n\n***第一次完全使用英文注释，如有英语语法错误，请告知，谢谢！***\n\n### Known Problems 已知问题\n- ~~Firefox（Nightly 51.0a1 2016-08-09）发现在 Shadow Dom 中控制 Element 的 display: none 样式时，会导致页面**崩溃**~~。\n\n  此问题在使用 Web Components v1 标准重构后不再存在，应该是之前 Firefox 实现 v0 规范时的 Bug。\n\n### Citation 引用说明\n农历计算部分相关算法参考自 [zzyss86/LunarCalendar](https://github.com/zzyss86/LunarCalendar)。\n\n## Usage 使用方法\n- Download the newest archives in GitHub Release[![GitHub Release](https://img.shields.io/github/release/jinliming2/Calendar-js.svg)](https://github.com/jinliming2/Calendar-js/releases).\n\n\u003e 从 GitHub Release[![GitHub Release](https://img.shields.io/github/release/jinliming2/Calendar-js.svg)](https://github.com/jinliming2/Calendar-js/releases) 下载最新版本类库。\n\n- Import `Calendar.js` Module in your web page. (Notice: If the class library is not under `src`, you should also modify the CSS file import path in the `templates.js` file.)\n\n\u003e 在页面中包含 `Calendar.js` 模块。（注意：如果类库目录不在 `src` 下，应该同时修改 `templates.js` 文件中的 CSS 文件导入路径。）\n\n```html\n\u003c!-- Must be imported as module by using the `type=\"module\"` --\u003e\n\u003c!-- 必须使用 `type=\"module\"` 模块形式导入 --\u003e\n\u003cscript type=\"module\" src=\"./src/Calendar.js\"\u003e\u003c/script\u003e\n```\n\n- Use the tag `\u003cdemo-calendar id=\"calendar\"\u003e\u003c/demo-calendar\u003e` directly in your HTML document.\n\n\u003e 直接在你的 HTML 文档中使用标签 `\u003cdemo-calendar id=\"calendar\"\u003e\u003c/demo-calendar\u003e` 即可。\n\n- Can be operated through the API on the DOM node:\n\n\u003e 可以通过 DOM 节点上的 API 进行操作：\n\n```javascript\nconst calendar = document.getElementById('calendar');  // Or querySelector, getElementsByTagName, etc.\nconsole.log(calendar.year, calendar.month, calendar.date);\ncalendar.lastYear();\ncalendar.nextMonth();\n// ......\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjinliming2%2Fcalendar-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjinliming2%2Fcalendar-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjinliming2%2Fcalendar-js/lists"}