Angular4.0 format () method error report

A date conversion method that displays both mouse over format and subDays.
always prompts for one more parameter. What"s wrong?

export interface Age {
  age: number;
  unit: AgeUnit;
}
    const age$ = Observable
      .combineLatest(ageNum$, ageUnit$, (_n, _u) => {
        return this.toDate({age: _n, unit: _u});
    })



format:

subDays:

Apr.09,2021

you don't give a prototype of the format function, so you can only guess that there is a time formatted function library called format.js
that provides a similar method, but it defines format on the prototype chain, so it is called like this date.format ('mm-dd-YYYY')

.

I don't know what the value returned by your subxxx series function is. If it is directly a Date Object
, your calling method should be

.
 return subYears(now, age.age).format(dateFormat);
//Date

look at the screenshot should be format passed an extra parameter, check the Angular document, it should not be the method of Angular itself.

if you want the effect of date conversion, you can consider pipe

or try this formatDate

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37a2a-2c0ba.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37a2a-2c0ba.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?