tambah hari / tanggal new tanggal /

misal kita butuh tanggal jatuh tempo  7 hari dari tanggal sekarang dsb

tambahkan pad component.ts dan module.ts (provider)

 import { DatePipe } from '@angular/common';

 pada contructor
 private datePipe: DatePipe


 buat fungsi

 clicFunction() {
     const xx = new Date(); const yy = xx.setDate( xx.getDate() + 3 );          console.log(this.datePipe.transform(yy, 'yyyy-MM-dd'));
 }

0 Response to "tambah hari / tanggal new tanggal / "

Post a Comment