I need time options only `11 AM to 1 PM (1:00:00 PM only)` and If system time is `1:00:01 PM` also should not be allowed. if time passed after `1 PM` I need to get the option availability as false.As of now till `1:59:59 PM` I'm getting value as true. If my system time moved to `2 PM` only getting false.
Suggest me how to get the solution for this. I should allow only `1:00:00 PM` and should not be allowed any other options.

```
public timeOptions = ['11 AM', '12 PM', '1 PM'];
  private currentTime: string[] = new Date()
    .toLocaleTimeString('en-US')
    .split(' ');
  private formattedTime: string = `${this.currentTime[0].split(':')[0]} ${
    this.currentTime[1]
  }`;
  private timeIndexOnOptions: number = this.timeOptions.indexOf(
    this.formattedTime
  );

  public timeOptionAvaialable(): void {
    let isOptionAvailable = this.timeIndexOnOptions != -1 ? true : false;
    console.log(isOptionAvailable);

```

[Stackblitz](https://stackblitz.com/edit/multiple-image-video-preview-final-s74tep?file=app%2Fapp.component.html,app%2Fapp.component.ts,app%2Fapp.component.css)