ngx-moment icon indicating copy to clipboard operation
ngx-moment copied to clipboard

Getting hours and min from future date

Open dcp3450 opened this issue 6 years ago • 0 comments

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);

dcp3450 avatar Jun 11 '18 19:06 dcp3450