Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$time service #10402

Closed
jpolo opened this issue Dec 10, 2014 · 1 comment · May be fixed by #10525
Closed

$time service #10402

jpolo opened this issue Dec 10, 2014 · 1 comment · May be fixed by #10525

Comments

@jpolo
Copy link

jpolo commented Dec 10, 2014

I would be nice to have a simple $time { now(): number } service. The now method would be a simple forward to Date.now()
This would allow cleaner and more testable code relying on timeout, calendar, etc. A mockable version would allow to set current time.

@caitp
Copy link
Contributor

caitp commented Dec 10, 2014

I could see this being useful, and could be a good place for a lot of the date input and date filter logic to live.

@caitp caitp added this to the Backlog milestone Dec 10, 2014
marcin-wosinek added a commit to marcin-wosinek/angular.js that referenced this issue Dec 19, 2014
Add simple $time service to allow easier mocking dates in applications.

Closes angular#10402
marcin-wosinek added a commit to marcin-wosinek/angular.js that referenced this issue Dec 19, 2014
Add simple $time service to allow easier mocking dates in applications.

Closes angular#10402
marcin-wosinek added a commit to marcin-wosinek/angular.js that referenced this issue Dec 19, 2014
Add simple $time service to allow easier mocking dates in applications.

Closes angular#10402
marcin-wosinek added a commit to marcin-wosinek/angular.js that referenced this issue Dec 19, 2014
Add simple $time service to allow easier mocking dates in applications.

Closes angular#10402
marcin-wosinek added a commit to marcin-wosinek/angular.js that referenced this issue Jan 9, 2015
Add simple $time service to allow easier mocking dates in applications.

Closes angular#10402
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants