{"id":18737459,"url":"https://github.com/6tail/lunar-javascript","last_synced_at":"2025-05-14T03:09:52.337Z","repository":{"id":38336292,"uuid":"138388152","full_name":"6tail/lunar-javascript","owner":"6tail","description":"日历、公历(阳历)、农历(阴历、老黄历)、佛历、道历，支持节假日、星座、儒略日、干支、生肖、节气、节日、彭祖百忌、每日宜忌、吉神宜趋凶煞宜忌、吉神(喜神/福神/财神/阳贵神/阴贵神)方位、胎神方位、冲煞、纳音、星宿、八字、五行、十神、建除十二值星、青龙名堂等十二神、黄道黑道日及吉凶等。lunar is a calendar library for Solar and Chinese Lunar.","archived":false,"fork":false,"pushed_at":"2025-04-29T10:26:31.000Z","size":842,"stargazers_count":1139,"open_issues_count":28,"forks_count":218,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-03T16:01:48.226Z","etag":null,"topics":["calendar","javascript","lunar"],"latest_commit_sha":null,"homepage":"https://6tail.cn/calendar/api.html","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/6tail.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,"zenodo":null}},"created_at":"2018-06-23T09:22:41.000Z","updated_at":"2025-04-29T11:25:57.000Z","dependencies_parsed_at":"2023-02-19T08:01:00.498Z","dependency_job_id":"a472b2f1-ba48-4f4f-945a-18644102dbb8","html_url":"https://github.com/6tail/lunar-javascript","commit_stats":{"total_commits":119,"total_committers":4,"mean_commits":29.75,"dds":"0.025210084033613467","last_synced_commit":"d038adead7b82a8fe5e064bd08c85e3a58f9d921"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/6tail%2Flunar-javascript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/6tail%2Flunar-javascript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/6tail%2Flunar-javascript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/6tail%2Flunar-javascript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/6tail","download_url":"https://codeload.github.com/6tail/lunar-javascript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254059510,"owners_count":22007769,"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","javascript","lunar"],"created_at":"2024-11-07T15:25:21.628Z","updated_at":"2025-05-14T03:09:47.315Z","avatar_url":"https://github.com/6tail.png","language":"JavaScript","readme":"# lunar [![License](https://img.shields.io/badge/license-MIT-4EB1BA.svg?style=flat-square)](https://github.com/6tail/lunar-javascript/blob/master/LICENSE)\n\nlunar是一款无第三方依赖的公历(阳历)、农历(阴历、老黄历)、佛历和道历工具，支持星座、儒略日、干支、生肖、节气、节日、彭祖百忌、每日宜忌、吉神宜趋、凶煞宜忌、吉神(喜神/福神/财神/阳贵神/阴贵神)方位、胎神方位、冲煞、纳音、星宿、八字、五行、十神、建除十二值星、青龙名堂等十二神、黄道日及吉凶等。\n\n[English](https://github.com/6tail/lunar-javascript/blob/master/README_EN.md)\n\n## 示例\n\n### 普通页面\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"utf-8\"\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cscript src=\"lunar.js\"\u003e\u003c/script\u003e\n    \u003cscript\u003e\n      var solar = Solar.fromYmd(1986,5,29);\n      console.log(solar.toFullString());\n      console.log(solar.getLunar().toFullString());\n    \u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n### npm\n\n    npm init\n    npm install lunar-javascript\n     \n    //test.js\n    const {Solar} = require('lunar-javascript')\n    //const {Solar, Lunar, HolidayUtil} = require('lunar-javascript')\n     \n    let solar = Solar.fromYmd(1986,5,29);\n    console.log(solar.toFullString());\n    console.log(solar.getLunar().toFullString());\n     \n    node test.js\n\n### Node.js\n\n    //test.js\n    const {Solar} = require('./lunar.js')\n    //const {Solar, Lunar, HolidayUtil} = require('./lunar.js')\n     \n    let solar = Solar.fromYmd(1986,5,29);\n    console.log(solar.toFullString());\n    console.log(solar.getLunar().toFullString());\n     \n    node test.js\n\n输出结果：\n\n    1986-05-29 00:00:00 星期四 双子座\n    一九八六年四月廿一 丙寅(虎)年 癸巳(蛇)月 癸酉(鸡)日 子(鼠)时 纳音[炉中火 长流水 剑锋金 桑柘木] 星期四 北方玄武 星宿[斗木獬](吉) 彭祖百忌[癸不词讼理弱敌强 酉不会客醉坐颠狂] 喜神方位[巽](东南) 阳贵神方位[巽](东南) 阴贵神方位[震](正东) 福神方位[兑](正西) 财神方位[离](正南) 冲[(丁卯)兔] 煞[东]\n\n## 文档\n\n请移步至 [https://6tail.cn/calendar/api.html](https://6tail.cn/calendar/api.html \"https://6tail.cn/calendar/api.html\")\n","funding_links":[],"categories":["🗓️ 按时间线"],"sub_categories":["🧹 春节前（准备期）"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F6tail%2Flunar-javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F6tail%2Flunar-javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F6tail%2Flunar-javascript/lists"}