{"id":19343281,"url":"https://github.com/swashcap/amd-date","last_synced_at":"2025-07-13T21:07:19.457Z","repository":{"id":17037069,"uuid":"19801325","full_name":"swashcap/amd-date","owner":"swashcap","description":"AMD-compatible JavaScript date printer.","archived":false,"fork":false,"pushed_at":"2014-05-16T03:28:36.000Z","size":144,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-24T09:17:14.450Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swashcap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-15T00:57:08.000Z","updated_at":"2014-05-16T03:28:36.000Z","dependencies_parsed_at":"2022-09-24T12:46:19.581Z","dependency_job_id":null,"html_url":"https://github.com/swashcap/amd-date","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/swashcap/amd-date","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swashcap%2Famd-date","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swashcap%2Famd-date/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swashcap%2Famd-date/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swashcap%2Famd-date/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swashcap","download_url":"https://codeload.github.com/swashcap/amd-date/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swashcap%2Famd-date/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265205690,"owners_count":23727511,"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":[],"created_at":"2024-11-10T03:37:54.073Z","updated_at":"2025-07-13T21:07:19.435Z","avatar_url":"https://github.com/swashcap.png","language":"JavaScript","readme":"# AMD Date\n\n_AMD-compatible JavaScript date printer._\n\nUse [Ruby-like string-to-time formats](http://rubyinrails.com/2013/09/strftime-format-time-in-ruby/) to get a JavaScript date as a string.\n\n## Usage\n\n1. Use [RequireJS](http://requirejs.org) or a similar module loader.\n2. Add _index.js_ to your project.\n3.    Load this script in a `define` or `require` (see [RequireJS’s docs](http://requirejs.org/docs/api.html#define)):\n\n    ```javascript\n    require(['path/to/amd-date/index'], function(DateHelper) {\n      ...\n    });\n    ```\n\n4.    Inside your module, use the `formatDate` method by passing it a date and desired output format:\n\n    ```javascript\n      var myDate = new Date();\n\n      var myFormattedDate = DateHelper.formatDate(myDate, '\u003ch1\u003e%B %d \u003csmall\u003e%Y\u003c/small\u003e\u003c/h1\u003e');\n\n      console.log(myFormattedDate);\n      // =\u003e \u003ch1\u003eMay 14 \u003csmall\u003e2014\u003csmall\u003e\u003c/h1\u003e\n    ```\n\n## Format Reference\n\n* `%H`: Hour (24)\n* `%I`: Hour (12)\n* `%M`: Minutes\n* `%S`: Seconds\n* `%Y`: Year\n* `%m`: Month\n* `%d`: day\n* `%w`: Week day\n* `%a`: Week day name (short)\n* `%A`: Week day name (full)\n* `%b`: Month name (short)\n* `%B`: Month name (full)\n* `%y`: Year (without century)\n* `%Z`: Time zone\n* `%p`: AM/PM\n\n## ToDos\n\n* Fix `%Z` timezone output\n* Internationalization\n* Add tests _(help needed!)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswashcap%2Famd-date","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswashcap%2Famd-date","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswashcap%2Famd-date/lists"}