Time service
import { TimeService } from '@trademe/tangram';
TimeService provides a mockable source of the current date and time.
Using Angular's dependency injection to access the current time makes it easy to fix "now" in unit tests. For date and time calculations, use date-fns instead.
Example
Properties
now: DateReturns the current date and time. This can be mocked in unit tests via Angular's dependency injection to fix "now" to a known value.