Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting hours and min from future date #196

Open
dcp3450 opened this issue Jun 11, 2018 · 0 comments
Open

Getting hours and min from future date #196

dcp3450 opened this issue Jun 11, 2018 · 0 comments

Comments

@dcp3450
Copy link

dcp3450 commented Jun 11, 2018

I can get the total number of hours and min from a future date as a whole but I need the difference in min to be based on the hour. For example if it's 3:17 pm and I'm testing against tomorrow, it responds 8h and 522m. Both are correct but what I'm wanting 8h and 43m.

{{nextDate | amDifference: currentDate : 'hours'}}h {{nextDate | amDifference: currentDate : 'minutes'}}m

this.nextDate = new Date();
this.nextDate.setDate(this.nextDate.getDate() + 1);
this.nextDate.setHours(0,0,0,0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant