title: Angular service worker check if version is less than a specified version
body: <p>While building the project I came across a feature due to which certain architecture of the locally stored data changed drastically. Now when users are using an older version compared to this they must be logged out so that the new architecture can be initialized, but if the versions are above this specific version they can simply reload as the architecture is intact and compatible. Currently, I am using the following code to check the update and reload it:</p>
  <pre><code>checkAppUpdates() {
      if (this.swUpdate.isEnabled) {
        this.swUpdate.available.subscribe((event) =&gt; {
          console.log('current version is', event.current);
          console.log('available version is', event.available);
          if (confirm('new version available)) {
  
            window.location.reload();
          }
        });
      }
    }
  </code></pre>
  <p>But as the versions are not number or date-time I cannot differentiate if the current version is before the specific version when the change was made.
  It would be better to have a date-time reference for versions to check for the required version.l</p>