in func2 in your service you are not return any thing in the last else
else {
var day2 = this.day + 10;
this.month = (day2 / 30) + 10;
this.day = (day2 % 30);
if (day2 % 30 == 0) {
this.month--;
this.day = 30;
}
this.year = this.gregorianYear - 622;
}
and in typescript version 5.2.2 its have error
in func2 in your service you are not return any thing in the last else
and in typescript version 5.2.2 its have error