introduce TRPC and service layer
This commit is contained in:
10
lib/services/util.service.ts
Normal file
10
lib/services/util.service.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export class UtilService {
|
||||
public static addMonths(date: Date, months: number): Date {
|
||||
const d = date.getDate();
|
||||
date.setMonth(date.getMonth() + +months);
|
||||
if (date.getDate() != d) {
|
||||
date.setDate(0);
|
||||
}
|
||||
return date;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user