{"id":15478395,"url":"https://github.com/tcort/handlebars-dateformat","last_synced_at":"2025-04-22T14:48:12.961Z","repository":{"id":37381957,"uuid":"46097807","full_name":"tcort/handlebars-dateformat","owner":"tcort","description":"handlebars date format helper","archived":false,"fork":false,"pushed_at":"2022-09-30T12:43:01.000Z","size":42,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-17T12:34:00.768Z","etag":null,"topics":["date","formatter","handlebars"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tcort.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-13T03:32:30.000Z","updated_at":"2024-02-09T15:55:03.000Z","dependencies_parsed_at":"2022-08-25T05:01:53.187Z","dependency_job_id":null,"html_url":"https://github.com/tcort/handlebars-dateformat","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcort%2Fhandlebars-dateformat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcort%2Fhandlebars-dateformat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcort%2Fhandlebars-dateformat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcort%2Fhandlebars-dateformat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tcort","download_url":"https://codeload.github.com/tcort/handlebars-dateformat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250262945,"owners_count":21401772,"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":["date","formatter","handlebars"],"created_at":"2024-10-02T04:03:56.535Z","updated_at":"2025-04-22T14:48:12.940Z","avatar_url":"https://github.com/tcort.png","language":"JavaScript","readme":"# handlebars-dateformat\n\n[handlebars](http://handlebarsjs.com/) date format [helper](http://handlebarsjs.com/block_helpers.html).\n\n## Installation\n\n    npm install --save handlebars-dateformat\n\n## Usage\n\n### Register the Helper\n\n    handlebars.registerHelper('dateFormat', require('handlebars-dateformat'));\n\n### Call the helper from a template\n\n    {{dateFormat date format utc}}\n\nParameters:\n\n* `date` is a JavaScript [Date](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date) or an instance of [moment](http://momentjs.com/).\n* `format` is a string containing the desired format (can be a variable or a literal). Placeholders are defined in the [moment.js docs](http://momentjs.com/docs/#/displaying/).\n* `utc` optional boolean (`true` or `false`) to decide whether or not to convert the date to UTC before formatting. Defaults to `false`.\n\n## Example\n\n`app.js`:\n\n    \"use strict\";\n\n    var hbs = require('hbs');\n    var express = require('express');\n\n    hbs.registerHelper('dateFormat', require('handlebars-dateformat'));\n\n    var app = express();\n\n    app.set('view engine', 'hbs');    \n\n    app.get('/', function (req, res) {\n        res.render('index', { now: new Date() });\n    });\n\n    app.listen(3000);\n\n`views/index.hbs`:\n\n    The server time is: {{dateFormat now \"dddd, MMMM Do YYYY, h:mm:ss a\"}}\n\n## Testing\n\n    npm test\n\n## License\n\nSee [LICENSE.md](https://github.com/tcort/handlebars-dateformat/blob/master/LICENSE.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcort%2Fhandlebars-dateformat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftcort%2Fhandlebars-dateformat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcort%2Fhandlebars-dateformat/lists"}