@nestjstools/clock
Version:
A lightweight, test-friendly clock abstraction for NestJS apps enabling flexible time management via dependency injection
18 lines • 460 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FixedClock = void 0;
const calendar_date_1 = require("../value-object/calendar-date");
class FixedClock {
date;
constructor(date) {
this.date = date;
}
now() {
return this.date;
}
today() {
return calendar_date_1.CalendarDate.fromDate(this.date);
}
}
exports.FixedClock = FixedClock;
//# sourceMappingURL=fixed-clock.js.map