{"id":39397682,"url":"https://github.com/permalinks/permalinks-date-helpers","last_synced_at":"2026-01-18T03:20:15.052Z","repository":{"id":57322230,"uuid":"82368768","full_name":"permalinks/permalinks-date-helpers","owner":"permalinks","description":"Plugin for Permalinks that adds date helpers and variables to the context.","archived":false,"fork":false,"pushed_at":"2018-01-11T06:25:07.000Z","size":12,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T09:24:49.602Z","etag":null,"topics":["context","date","helper","permalink","permalinks"],"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/permalinks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-18T07:10:10.000Z","updated_at":"2020-08-29T14:26:20.000Z","dependencies_parsed_at":"2022-08-25T20:40:16.314Z","dependency_job_id":null,"html_url":"https://github.com/permalinks/permalinks-date-helpers","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/permalinks/permalinks-date-helpers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permalinks%2Fpermalinks-date-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permalinks%2Fpermalinks-date-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permalinks%2Fpermalinks-date-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permalinks%2Fpermalinks-date-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/permalinks","download_url":"https://codeload.github.com/permalinks/permalinks-date-helpers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permalinks%2Fpermalinks-date-helpers/sbom","scorecard":{"id":727996,"data":{"date":"2025-08-11","repo":{"name":"github.com/permalinks/permalinks-date-helpers","commit":"816c63b0fc0b8e4b5bb4724b13802068a40bd616"},"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/7 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":"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":"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":"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":"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-22T13:27:34.337Z","repository_id":57322230,"created_at":"2025-08-22T13:27:34.337Z","updated_at":"2025-08-22T13:27:34.337Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28528036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":["context","date","helper","permalink","permalinks"],"created_at":"2026-01-18T03:20:14.101Z","updated_at":"2026-01-18T03:20:14.988Z","avatar_url":"https://github.com/permalinks.png","language":"JavaScript","readme":"# permalinks-date-helpers [![NPM version](https://img.shields.io/npm/v/permalinks-date-helpers.svg?style=flat)](https://www.npmjs.com/package/permalinks-date-helpers) [![NPM monthly downloads](https://img.shields.io/npm/dm/permalinks-date-helpers.svg?style=flat)](https://npmjs.org/package/permalinks-date-helpers) [![NPM total downloads](https://img.shields.io/npm/dt/permalinks-date-helpers.svg?style=flat)](https://npmjs.org/package/permalinks-date-helpers) [![Linux Build Status](https://img.shields.io/travis/permalinks/permalinks-date-helpers.svg?style=flat\u0026label=Travis)](https://travis-ci.org/permalinks/permalinks-date-helpers)\n\n\u003e Plugin for Permalinks that adds date helpers and variables to the context.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save permalinks-date-helpers\n```\n\n## Usage\n\n```js\nvar dateHelpers = require('permalinks-date-helpers');\nvar Permalinks = require('permalinks');\nvar permalinks = new Permalinks();\n\npermalinks.use(dateHelpers());\nvar file = {path: 'posts/about.md', data: {date: '2017-02-02'}};\npermalinks.format(':year/:month/:day/:stem/index.html');\n//=\u003e '2017/02/02/about/index.html'\n\npermalinks.format(':date(\"YYYY/MM/DD\")/:stem/index.html');\n//=\u003e '2017/02/02/about/index.html'\n```\n\n## Helpers\n\n### [:date](index.js#L64)\n\nUses moment to create a formatted date string from the given `format` and optional `date`.\n\n**Params**\n\n* `format` **{String}**\n* `date` **{String|Date}**\n* `returns` **{String}**\n\n**Example**\n\n```js\npermalinks.format(':date', file);\n//=\u003e '2017-02-15'\npermalinks.format(':date()', file);\n//=\u003e '2017-02-15'\npermalinks.format(':date(\"MM\")', file);\n//=\u003e '02'\npermalinks.format(':date(\"YYYY\")', file);\n//=\u003e '2017'\npermalinks.format(':date(\"DD\")', file);\n//=\u003e '15'\npermalinks.format(':date(\"dddd, MMMM Do YYYY, h:mm:ss a\")', file);\n//=\u003e 'Sunday, February 14th 2017, 3:25:50 pm'\npermalinks.format(':slugify(date(\"dddd, MMMM Do YYYY, h:mm:ss a\"))', file);\n//=\u003e 'sunday-february-14th-2017-3-25-50-pm'\n```\n\n## Variables\n\nIn addition to the [date](#date) helper itself, the following variables will be exposed on the context as a result of registering the `date` helper (these aren't helpers, just strings):\n\n| **Name** | **Description** | **Example** | \n| --- | --- | --- |\n| `:year` | Published year of posts (4-digit) | `2017` |\n| `:month` | Published month of posts (2-digit) | `09` |\n| `:i_month` | Published month of posts (Without leading zeros) | `9` |\n| `:day` | Published day of posts (2-digit) | `02` |\n| `:i_day` | Published day of posts (Without leading zeros) | `2` |\n| `:hour` | Hour of the day | `11` |\n| `:minute` | Minute of the hour | `15` |\n| `:second` | Second of the minute | `45` |\n\n## About\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eContributing\u003c/strong\u003e\u003c/summary\u003e\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\nPlease read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eRunning Tests\u003c/strong\u003e\u003c/summary\u003e\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n\u003c/details\u003e\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eBuilding docs\u003c/strong\u003e\u003c/summary\u003e\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n\u003c/details\u003e\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [gulp-permalinks](https://www.npmjs.com/package/gulp-permalinks): Gulp plugin for easily creating permalinks for vinyl files. | [homepage](https://github.com/doowb/gulp-permalinks \"Gulp plugin for easily creating permalinks for vinyl files.\")\n* [permalinks](https://www.npmjs.com/package/permalinks): Easily add powerful permalink or URL routing/URL rewriting capablities to any node.js project. Can be… [more](https://github.com/permalinks/permalinks) | [homepage](https://github.com/permalinks/permalinks \"Easily add powerful permalink or URL routing/URL rewriting capablities to any node.js project. Can be used in static site generators, build systems, web applications or anywhere you need to do path or URL transformation.\")\n* [static-rewrite](https://www.npmjs.com/package/static-rewrite): Easily generate destination paths or static URLs by mapping user-friendly patterns to server-side build paths. | [homepage](https://github.com/permalinks/static-rewrite \"Easily generate destination paths or static URLs by mapping user-friendly patterns to server-side build paths.\")\n\n### Author\n\n**Jon Schlinkert**\n\n* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert)\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on January 11, 2018._","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermalinks%2Fpermalinks-date-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpermalinks%2Fpermalinks-date-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermalinks%2Fpermalinks-date-helpers/lists"}