[Solved] how to convert Java Instant for showing Date in the angular client side? [closed]


Angular have built in date pipe

setDateTime(dateTime) {
    let pipe = new DatePipe('en-US');

    const time = pipe.transform(dateTime, 'mediumTime', 'UTC');

    const date = pipe.transform(dateTime, 'MM/dd/yyyy', 'UTC');

    return date + ' ' + time;
  }

html

<span>{{dateTime| date:'MM/dd/yyyy' : 'UTC'}}</span>

1

solved how to convert Java Instant for showing Date in the angular client side? [closed]