{"id":19621363,"url":"https://github.com/commenthol/date-bengali-revised","last_synced_at":"2025-10-11T05:03:58.556Z","repository":{"id":45057300,"uuid":"146793383","full_name":"commenthol/date-bengali-revised","owner":"commenthol","description":"Revised Bengali Calendar","archived":false,"fork":false,"pushed_at":"2022-05-21T08:30:05.000Z","size":23,"stargazers_count":3,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-03T04:30:36.644Z","etag":null,"topics":[],"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/commenthol.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}},"created_at":"2018-08-30T18:55:45.000Z","updated_at":"2025-03-01T08:30:37.000Z","dependencies_parsed_at":"2022-08-29T21:52:23.779Z","dependency_job_id":null,"html_url":"https://github.com/commenthol/date-bengali-revised","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/commenthol/date-bengali-revised","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fdate-bengali-revised","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fdate-bengali-revised/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fdate-bengali-revised/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fdate-bengali-revised/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/commenthol","download_url":"https://codeload.github.com/commenthol/date-bengali-revised/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fdate-bengali-revised/sbom","scorecard":{"id":300808,"data":{"date":"2025-08-11","repo":{"name":"github.com/commenthol/date-bengali-revised","commit":"89e8cfdd28ff6df5cee50af95c8c76687859fd20"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/19 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/commenthol/date-bengali-revised/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/commenthol/date-bengali-revised/ci.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:30","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T20:34:54.386Z","repository_id":45057300,"created_at":"2025-08-17T20:34:54.386Z","updated_at":"2025-08-17T20:34:54.386Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006334,"owners_count":26084083,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11T11:22:40.792Z","updated_at":"2025-10-11T05:03:58.519Z","avatar_url":"https://github.com/commenthol.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# date-bengali-revised\n\n\u003e Revised Bengali Calendar\n\n[![NPM version](https://badge.fury.io/js/date-bengali-revised.svg)](https://www.npmjs.com/package/date-bengali-revised/)\n[![Build Status](https://github.com/commenthol/date-bengali-revised/workflows/CI/badge.svg?branch=master\u0026event=push)](https://github.com/commenthol/date-bengali-revised/actions/workflows/ci.yml?query=branch%3Amaster)\n\nRevised Bengali Calendar calculations with conversion from/ to Gregorian Date.  \nThe revised version of the Bengali calendar was officially adopted in Bangladesh in 1987.\n\nThe module supports:\n\n- conversion from Gregorian Date to Bengali Date and vice versa\n- conversion from javascript Date object to Bengali Date and vice versa\n- formatting\n\nCredits to Nuhil Mehdy for his project [bangla-calendar][].\nThe inital algorithm and the bengali names were taken from there. Thanks.\n\n## Table of Contents\n\n\u003c!-- !toc (minlevel=2 omit=\"Table of Contents\") --\u003e\n\n* [Usage](#usage)\n  * [Construct a new Bengali Date](#construct-a-new-bengali-date)\n  * [from Gregorian Date](#from-gregorian-date)\n  * [to Gregorian Date](#to-gregorian-date)\n  * [from Date](#from-date)\n  * [to Date](#to-date)\n  * [formatting](#formatting)\n* [Contribution and License Agreement](#contribution-and-license-agreement)\n* [License](#license)\n* [References](#references)\n\n\u003c!-- toc! --\u003e\n\n## Usage\n\n### Construct a new Bengali Date\n\n**Parameters**\n\n_year_: `{Number|String}`, bengali year in bengal or latin digits  \n_month_: `{Number|String}`, bengali month  \n_day_: `{Number|String}`, bengali day\n\n```js\n// ES5\nimport Calendar from 'date-bengali-revised'\n// CommonJs\nconst Calendar = require('date-bengali-revised').default\n\nlet cal = new Calendar(1425, 1, 1)\n//\u003e { year: 1425, month: 1, day: 1}\n\n// with bengali digits\ncal = new Calendar('১৪২৫', '১', '১')\n//\u003e { year: 1425, month: 1, day: 1}\n\n// with bengali month name\ncal = new Calendar('১৪২৫', 'বৈশাখ', '১')\n//\u003e { year: 1425, month: 1, day: 1}\n```\n\n### from Gregorian Date\n\n**Parameters**\n\n_year_: `{Number}`, gregorian year  \n_month_: `{Number}`, gregorian month  \n_day_: `{Number}`, gregorian day\n\n**Returns**: _this_ for chaining\n\n```js\nimport Calendar from 'date-bengali-revised'\nlet cal = new Calendar()\ncal.fromGregorian(2018, 4, 14)\n//\u003e { year: 1425, month: 1, day: 1}\n```\n\n### to Gregorian Date\n\nConvert Bengali Date back to Gregorian Date\n\n**Returns**: `{Object}` `{year, month, day}` as gregorian date\n\n```js\nlet cal = new Calendar(1425, 1, 1)\nlet gdate = cal.toGregorian()\n//\u003e { year: 2018, month: 4, day: 14 }\n```\n\n### from Date\n\nCalculate bengali calendar date from javascript Date object\n\n**Parameters**\n\n_date_: `{Date}` - javascript Date object\n\n**Returns**: _this_ for chaining\n\n```js\nlet cal = new Calendar()\nlet date = new Date('2018-04-14T06:00:00Z')\ncal.fromDate(date)\n//\u003e { year: 1425, month: 1, day: 1}\n```\n\n### to Date\n\n**Returns**: `{Date}` - javascript Date object\n\n```js\nlet cal = new Calendar(1425, 1, 1)\nlet date = cal.toDate(date).toISOString()\n//\u003e '2018-04-14T06:00:00Z'\n```\n\n### formatting\n\n**Parameters**\n\n_formatStr_: `{String}` - formatting string\n\n| Input | Description  |\n| ----- | ------------ |\n| Y     | Year with any number of digits and sign |\n| Q     | Season Name  |\n| M     | Month number |\n| MMMM  | Month name   |\n| D     | Day of month |\n| dddd  | Day name     |\n\n**Returns**: `{String}` formatted date\n\n```js\nlet cal = new Calendar(1425, 1, 1)\ncal.format()\n//\u003e '১ ১, ১৪২৫'\ncal.format('dddd D MMMM, Y [Q]')\n//\u003e 'শনিবার ১ বৈশাখ, ১৪২৫ [গ্রীষ্ম]'\n```\n\n## Contribution and License Agreement\n\nIf you contribute code to this project, you are implicitly allowing your\ncode to be distributed under the MIT license. You are also implicitly\nverifying that all code is your original work or correctly attributed\nwith the source of its origin and License.\n\n## License\n\nCopyright (c) 2018-present commenthol (MIT License)\n\nSee [LICENSE][] for more info.\n\n## References\n\n\u003c!-- !ref --\u003e\n\n* [bangla-calendar][bangla-calendar]\n* [LICENSE][LICENSE]\n\n\u003c!-- ref! --\u003e\n\n[LICENSE]: ./LICENSE\n[bangla-calendar]: https://github.com/nuhil/bangla-calendar\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommenthol%2Fdate-bengali-revised","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommenthol%2Fdate-bengali-revised","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommenthol%2Fdate-bengali-revised/lists"}