refactor(facade): remove DateWrapper (#12027)
This commit is contained in:

committed by
Chuck Jazdzewski

parent
c3c9ecb302
commit
decd129a4d
@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
import {Component, Injectable} from '@angular/core';
|
||||
import {DateWrapper, isPresent} from '@angular/core/src/facade/lang';
|
||||
import {isPresent} from '@angular/core/src/facade/lang';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
|
||||
import * as db from './data';
|
||||
@ -102,10 +102,7 @@ export class InboxCmp {
|
||||
if (sortEmailsByDate) {
|
||||
this.items.sort(
|
||||
(a: InboxRecord, b: InboxRecord) =>
|
||||
DateWrapper.toMillis(DateWrapper.fromISOString(a.date)) <
|
||||
DateWrapper.toMillis(DateWrapper.fromISOString(b.date)) ?
|
||||
-1 :
|
||||
1);
|
||||
new Date(a.date).getTime() < new Date(b.date).getTime() ? -1 : 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user