{"id":21165432,"url":"https://github.com/msarhan/hijrah-date","last_synced_at":"2025-10-24T04:49:41.484Z","repository":{"id":57140824,"uuid":"70911651","full_name":"msarhan/hijrah-date","owner":"msarhan","description":"Javascript date in the Hijrah calendar system.","archived":false,"fork":false,"pushed_at":"2016-10-14T23:29:21.000Z","size":62,"stargazers_count":18,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-02T14:35:39.879Z","etag":null,"topics":["hijrah","ummalqura"],"latest_commit_sha":null,"homepage":null,"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/msarhan.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":"2016-10-14T13:14:59.000Z","updated_at":"2023-04-09T14:52:50.000Z","dependencies_parsed_at":"2022-08-31T00:01:47.200Z","dependency_job_id":null,"html_url":"https://github.com/msarhan/hijrah-date","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/msarhan/hijrah-date","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msarhan%2Fhijrah-date","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msarhan%2Fhijrah-date/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msarhan%2Fhijrah-date/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msarhan%2Fhijrah-date/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msarhan","download_url":"https://codeload.github.com/msarhan/hijrah-date/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msarhan%2Fhijrah-date/sbom","scorecard":{"id":665278,"data":{"date":"2025-08-11","repo":{"name":"github.com/msarhan/hijrah-date","commit":"fcef5a2f8f88d71f697e28dc9d26114ac016fa60"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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/4 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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"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":"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"}}]},"last_synced_at":"2025-08-21T17:48:08.692Z","repository_id":57140824,"created_at":"2025-08-21T17:48:08.692Z","updated_at":"2025-08-21T17:48:08.692Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280742562,"owners_count":26382923,"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-24T02:00:06.418Z","response_time":73,"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":["hijrah","ummalqura"],"created_at":"2024-11-20T14:33:00.616Z","updated_at":"2025-10-24T04:49:41.449Z","avatar_url":"https://github.com/msarhan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HijrahDate [![Build Status](https://travis-ci.org/msarhan/hijrah-date.svg?branch=master)](https://travis-ci.org/msarhan/hijrah-date)\nJavascript date in the Hijrah calendar system.\n\n\n## Install\n\nYou can install this package either with `npm` or with `bower`.\n\n### npm\n\n```shell\nnpm install hijrah-date\n```\n\n### bower\n\n```shell\nbower install hijrah-date\n```\n\nThen add a `\u003cscript\u003e` to your `index.html`:\n\n```html\n\u003cscript src=\"/bower_components/hijrah-date/hijrah-date.js\"\u003e\u003c/script\u003e\n```\n\n## Usage\n### Creating new instance\n```js\nnew HijrahDate();\nnew HijrahDate(year, month[, day[, hour[, minutes[, seconds[, milliseconds]]]]]);\n```\n```js\nvar hijrahDate1 = new HijrahDate();\nvar hijrahDate2 = new HijrahDate(1437, 11, 10);\nvar hijrahDate3 = new HijrahDate(1437, 11, 10, 14, 40);\n```\n\n### Read methods\nMost of native `Date`'s read methods are available in HijrahDate\n```js\nvar hijrahDate = new HijrahDate(1437, 11, 14, 15, 50, 21, 456);\nhijrahDate.getTime()\t\t\t// 1473943821456\nhijrahDate.getFullYear()\t\t// 1437\nhijrahDate.getMonth()\t\t\t// 11\nhijrahDate.getDate()\t\t\t// 14\nhijrahDate.getDay()\t\t\t\t// 4\nhijrahDate.getHours()\t\t\t// 15\nhijrahDate.getMinutes()\t\t\t// 50\nhijrahDate.getSeconds()\t\t\t// 21\nhijrahDate.getMilliseconds()\t// 456\n\nhijrahDate.getMonthLength()\t\t// 30\nhijrahDate.getYearLength()\t\t// 354\nhijrahDate.getDayOfYear()\t\t// 338\nhijrahDate.isLeapYear()\t\t\t// false\nhijrahDate.toEpochDay()\t\t\t// 17055\n```\n\n### Manipulate\n```js\nHijrahDate::plusYears(yearsToAdd)\nHijrahDate::plusMonths(monthsToAdd)\nHijrahDate::plusWeeks(weeksToAdd)\nHijrahDate::plusDays(daysToAdd)\n\nHijrahDate::minusYears(yearsToSubtract)\nHijrahDate::minusMonths(monthsToSubtract)\nHijrahDate::minusWeeks(weeksToSubtract)\nHijrahDate::minusDays(daysToSubtract)\n```\nExample\n```js\nvar hijrahDate = new HijrahDate(1437, 11, 10);\nvar hijrahDate2 = hd.plusYears(1)\n\t.plusMonths(2)\n\t.plusDays(5);\n```\n\n### Conversion\n#### `HijrahDate` To `Date`\nUsing `HijrahDate::toGregorian` function\n```js\nvar hijrahDate = new HijrahDate(1437, 11, 10, 14, 40, 23, 15);\nvar date = hd.toGregorian();\n```\n\n#### `Date` To `HijrahDate`\n```js\nvar date = new Date(2016, 9, 23);\nvar hijrahDate = new HijrahDate(date);\n```\n\n### Format\n`HijrahDate::format(format[, localeId])`\n\nFormats `HijrahDate` to a string based on the requested format. Formats ported from [AngularJS' date filter](https://docs.angularjs.org/api/ng/filter/date).\n\n`localeId` string 'en' or 'ar'\n\n`format` string can be composed of the following elements:\n* 'yyyy': 4 digit representation of year (e.g. 1437)\n* 'yy': 2 digit representation of year, padded (00-99). (e.g. 1330 =\u003e 30, 1437 =\u003e 37)\n* 'y': 1 digit representation of year, e.g. (1330 =\u003e 1330, AD 1438 =\u003e 1438)\n* 'MMMM': Month in year (Muharram-Dhuʻl-Hijjah)\n* 'MMM': Month in year (Muh-Dhuʻl-H)\n* 'MM': Month in year, padded (01-12)\n* 'M': Month in year (1-12)\n* 'LLLL': Stand-alone month in year (Muharram-Dhuʻl-Hijjah)\n* 'dd': Day in month, padded (01-30)\n* 'd': Day in month (1-30)\n* 'EEEE': Day in Week,(Sunday-Saturday)\n* 'EEE': Day in Week, (Sun-Sat)\n* 'HH': Hour in day, padded (00-23)\n* 'H': Hour in day (0-23)\n* 'hh': Hour in AM/PM, padded (01-12)\n* 'h': Hour in AM/PM, (1-12)\n* 'mm': Minute in hour, padded (00-59)\n* 'm': Minute in hour (0-59)\n* 'ss': Second in minute, padded (00-59)\n* 's': Second in minute (0-59)\n* 'sss': Millisecond in second, padded (000-999)\n* 'a': AM/PM marker\n* 'Z': 4 digit (+sign) representation of the timezone offset (-1200-+1200)\n* 'ww': Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year\n* 'w': Week of year (0-53). Week 1 is the week with the first Thursday of the year\n* 'G', 'GG', 'GGG': The abbreviated form of the era string (e.g. 'AD')\n* 'GGGG': The long form of the era string (e.g. 'Anno Hegirae')\n\nformat string can also be one of the following predefined localizable formats:\n\n* 'medium': equivalent to 'MMM d, y h:mm:ss a' for en_US locale (e.g. Muh 3, 1437 12:05:08 PM)\n* 'short': equivalent to 'M/d/yy h:mm a' for en_US locale (e.g. 9/3/37 12:05 PM)\n* 'fullDate': equivalent to 'EEEE, MMMM d, y' for en_US locale (e.g. Friday, Ramadan 24, 1431)\n* 'longDate': equivalent to 'MMMM d, y' for en_US locale (e.g. Ramadan 3, 1437)\n* 'mediumDate': equivalent to 'MMM d, y' for en_US locale (e.g. Ram 3, 1437)\n* 'shortDate': equivalent to 'M/d/yy' for en_US locale (e.g. 9/3/37)\n* 'mediumTime': equivalent to 'h:mm:ss a' for en_US locale (e.g. 12:05:08 PM)\n* 'shortTime': equivalent to 'h:mm a' for en_US locale (e.g. 12:05 PM)\n\nformat string can contain literal values. These need to be escaped by surrounding with single quotes (e.g. \"h 'in the morning'\"). In order to output a single quote, escape it - i.e., two single quotes in a sequence (e.g. \"h 'o''clock'\").\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsarhan%2Fhijrah-date","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsarhan%2Fhijrah-date","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsarhan%2Fhijrah-date/lists"}