{"id":16978682,"url":"https://github.com/srph/angular-age-filter","last_synced_at":"2026-04-14T00:03:33.000Z","repository":{"id":25759756,"uuid":"29197815","full_name":"srph/angular-age-filter","owner":"srph","description":"An angular filter that converts date to age","archived":false,"fork":false,"pushed_at":"2015-01-14T16:03:27.000Z","size":160,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-22T02:13:48.849Z","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":"mit","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":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-13T15:59:23.000Z","updated_at":"2015-01-14T16:03:27.000Z","dependencies_parsed_at":"2022-08-24T14:14:01.606Z","dependency_job_id":null,"html_url":"https://github.com/srph/angular-age-filter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/srph/angular-age-filter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Fangular-age-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Fangular-age-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Fangular-age-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Fangular-age-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srph","download_url":"https://codeload.github.com/srph/angular-age-filter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Fangular-age-filter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269838402,"owners_count":24483198,"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-08-11T02:00:10.019Z","response_time":75,"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.324Z","updated_at":"2026-04-14T00:03:32.975Z","avatar_url":"https://github.com/srph.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# angular-age-filter\n\n[![Build Status](https://travis-ci.org/srph/angular-age-filter.svg)](https://travis-ci.org/srph/angular-age-filter)\n[![Bower Version | fury.io](https://badge.fury.io/bo/angular-srph-age-filter.svg)](https://badge.fury.io/bo/angular-srph-age-filter.svg)\n[![Author | Shields.io](http://img.shields.io/badge/author-%40srph-blue.svg?style=flat-square)](http://twitter.com/_srph)\n\nAn angular filter that converts date to age \u003cdel\u003efor lazy people\u003c/del\u003e.\n\n## Getting Started\n\nShould work with AngularJS ```\u003e=1.2.0```.\n\n### Installation\n\n**```angular-age-filter``` is available via [Bower]**\n\n```bash\n$ bower install angular-srph-age-filter\n```\n\n**Include the script to your HTML file**\n\n```html\n\u003c!-- other scripts --\u003e\n\u003cscript src=\"/path/to/angular-age-filter.js\"\u003e\u003c/script\u003e\n```\n\n**Add the ```srph.age-filter``` module in your module's dependencies.**\n\n```js\nangular.module('myApp', ['srph.age-filter']);\n```\n\n### Usage\n\n**Templates**\n\n```html\n{{ '11/23/1996' | age }}\n{{ 848678400000 | age }}\n```\n\n**Controller, directives, etc..**\n\n```js\napp.controller('YoloController', function($scope, $filter) {\n\t$scope.myDate = $filter('age')('11/23/1996');\n\t$scope.hisDate = $filter('age')(848678400000);\n})\n```\n\n**It also accepts a second parameter, testing the birthdate against a given time, such as:**\n\n```html\n{{ '11/23/1996' | age: '11/23/2001' }}\n```\n\nOutputs: ```5```\n\n## Contribution\n\nFor features or fixes, I would suggest to submit an issue first before submitting a pull request. This avoids closed pull-requests; useless work.\n\n```\n=========      ================\n| issue |  -\u003e  | pull-request |\n=========      ================\n```\n\n### Building\n\n**Pre-requisites:**\n\n1. ```karma-cli```\n2. ```bower```\n3. ```npm```\n4. ```nodejs```\n\nStart by forking this repository. Then run these commands to install the project's dependencies:\n\n```bash\n# root dir\n$ npm install \u0026 bower install\n```\n\nUglification / Testing:\n\n```bash\n# root dir\n$ karma start # watches / runs the tests\n$ npm run uglify # uglifies the source\n```\n\n### Coding Style\n\nThis was copy-pasted from [```ReactJS```'s contribution style guide](https://github.com/facebook/react/blob/master/CONTRIBUTING.md)\n\n1. Use semicolons;\n2. Commas last,\n3. 2 spaces for indentation (no tabs)\n4. Prefer ```'``` over ```\"```\n5. ```\"use strict\";```\n6. 80 character line length\n8. \"Attractive\"\n9. Keep it simple, stupid\n\nDo not forget to add tests!\n\n\n## Acknowlegement\n\nThis isn't entirely my work; you might want to check this [Stack Overflow Answer](http://stackoverflow.com/questions/24883308/convert-birthday-to-age-in-angularjs) by [pixelbits](http://stackoverflow.com/users/3661630/pixelbits).\n\n**angular-age-filter** © 2014+, Kier Borromeo (srph). Released under the [MIT](http://mit-license.org/) License.\u003cbr\u003e\n\n\u003e [srph.github.io](http://srph.github.io) \u0026nbsp;\u0026middot;\u0026nbsp;\n\u003e GitHub [@srph](https://github.com/srph) \u0026nbsp;\u0026middot;\u0026nbsp;\n\u003e Twitter [@_srph](https://twitter.com/_srph)\n\n[MIT]: http://mit-license.org/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrph%2Fangular-age-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrph%2Fangular-age-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrph%2Fangular-age-filter/lists"}