{"id":16978683,"url":"https://github.com/srph/angular-timestamp-filter","last_synced_at":"2026-02-25T22:03:01.377Z","repository":{"id":58239752,"uuid":"28138441","full_name":"srph/angular-timestamp-filter","owner":"srph","description":":calendar: AngularJS filter which converts date to timestamp","archived":false,"fork":false,"pushed_at":"2015-06-13T08:54:26.000Z","size":231,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-15T04:46:05.015Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srph.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-12-17T13:28:40.000Z","updated_at":"2016-03-06T12:09:52.000Z","dependencies_parsed_at":"2022-08-31T03:01:57.382Z","dependency_job_id":null,"html_url":"https://github.com/srph/angular-timestamp-filter","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/srph/angular-timestamp-filter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Fangular-timestamp-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Fangular-timestamp-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Fangular-timestamp-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Fangular-timestamp-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srph","download_url":"https://codeload.github.com/srph/angular-timestamp-filter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Fangular-timestamp-filter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266828638,"owners_count":23991219,"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-07-24T02:00:09.469Z","response_time":99,"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-10-14T01:44:00.332Z","updated_at":"2026-02-25T22:03:01.348Z","avatar_url":"https://github.com/srph.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"angular-timestamp-filter\r\n=====\r\n\r\n[![Build Status](https://travis-ci.org/srph/angular-timestamp-filter.svg)](https://travis-ci.org/srph/angular-timestamp-filter) [![Bower version](https://badge.fury.io/bo/angular-srph-timestamp-filter.svg)](http://badge.fury.io/bo/angular-srph-timestamp-filter) [![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)\r\n\r\nFilter which parses date (```11/23/1996 12:23:42```) to timestamp.\r\n\r\nFor some reason, Angular's [```date``` filter](https://docs.angularjs.org/api/ng/filter/date) doesn't seem to be able to convert timestamp format `M-d-Y h:i:s` properly. This library allows you to convert your date (string or a Date instance) to a timestamp.\r\n\r\n## Getting Started\r\n\r\n### Requirements\r\n\r\nNot sure if it works with versions Angular ```\u003c=1.2```, but it should work fine (unless the ```Filter``` API changed) with Angular ```\u003e=1.2```.\r\n\r\n### Installation\r\n\r\n```angular-timestamp-filter``` is available in [**bower**]\r\n\r\n```bash\r\n$ bower install angular-srph-timestamp-filter\r\n```\r\n\r\nWhile it is also possible to use a CDN (thanks to [RawGit](https://rawgit.com/)).\r\n\r\n```html\r\n\u003c!-- use this for examples or during development --\u003e\r\n\u003cscript src=\"https://rawgit.com/srph/angular-timestamp-filter/master/angular-timestamp-filter.js\"\u003e\u003c/script\u003e\r\n\u003c!-- or you could just forget about it and use this (recommended for production) --\u003e\r\n\u003cscript src=\"https://cdn.rawgit.com/srph/angular-timestamp-filter/master/angular-timestamp-filter.js\"\u003e\u003c/script\u003e\r\n```\r\n\r\nInclude the script in your template (replace ```path/to/``` with its proper path) after AngularJS.\r\n```html\r\n\u003c!-- make sure they are in proper order --\u003e\r\n\u003cscript src=\"path/to/angular.js\"\u003e\u003c/script\u003e\r\n\u003c!-- other scripts... --\u003e\r\n\u003cscript src=\"path/to/angular-timestamp-filter.js\"\u003e\u003c/script\u003e\r\n```\r\n\r\nAdd in the library's module to your module's dependencies:\r\n\r\n```js\r\nangular.module('your-app-name', [/** other deps */, 'srph.timestamp-filter']);\r\n```\r\n\r\n### Usage\r\n\r\nThrough html binding (delimiters ```{{}}```)\r\n```html\r\n{{ '11/23/1996' | timestamp }}\r\n```\r\n\r\nYou can do the same thing with ```ng-bind```\r\n```html\r\n\u003cspan ng-bind=\"'11/23/1996' | timestamp\"\u003e\u003c/span\u003e\r\n```\r\n\r\nOr with ```$filter```\r\n```js\r\nMyController.$inject = ['$scope', '$filter'];\r\n\r\nfunction MyController($scope, $filter) {\r\n  $scope.date = $filter('timestamp')('11/23/1996');\r\n}\r\n```\r\n\r\nThe most practical way to use this library is to integrate it with the ```date``` filter by Angular. For instance,\r\n\r\n```html\r\n{{ '11/23/1996 00:00:00' | timestamp | date: 'MMM d, yyyy' }}\r\n\u003c!-- should display Nov. 23, 1996 --\u003e\r\n```\r\n\r\n## Compatibility\r\n\r\n\\* As of version `v0.1.0`, `angular-timestamp-filter` [now harmonically works with Firefox `Date.parse` issue with dashes](http://stackoverflow.com/questions/11516332/date-parse-results-in-nan).\r\n\r\nI have no time as of now, but you can check if there are issues with ```Date.parse```.\r\n\r\n## Changelog\r\n\r\nSee the [Changelog](https://github.com/srph/angular-timestamp-filter/blob/master/doc/changelog.md) file.\r\n\r\n## Contribution\r\n\r\nI'd suggest to submit an issue first before putting up a pull-request as this avoids closed pull-requests; no wasted work. Feel free to put up an issue or submit a pull-request!\r\n\r\nNot obligatory, but **don't forget to add tests**!\r\n\r\n### Building\r\n\r\nCheck the [Building docs](https://github.com/srph/angular-timestamp-filter/blob/master/doc/building.md).\r\n\r\n## Acknowledgement\r\n\r\n**angular-timestamp-filter** © 2015+, Kier Borromeo (srph). **angular-timestamp-filter** is released under the [MIT](mit-license.org) license.\r\n\r\n\u003e [srph.github.io](http://srph.github.io) \u0026nbsp;\u0026middot;\u0026nbsp;\r\n\u003e GitHub [@srph](https://github.com/srph) \u0026nbsp;\u0026middot;\u0026nbsp;\r\n\u003e Twitter [@_srph](https://twitter.com/_srph)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrph%2Fangular-timestamp-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrph%2Fangular-timestamp-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrph%2Fangular-timestamp-filter/lists"}