be.fgov.ehealth.etee.crypto.utils

## Class TimeFrameValidator

- java.lang.Object
- - be.fgov.ehealth.etee.crypto.utils.TimeFrameValidator

-     public final class TimeFrameValidator
      extends java.lang.Object

  Utility class to validate a timeframe with a clock skew.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static TimeFrameValidator` | `create(long acceptedClockSkew)`
    `boolean` | `validate(java.util.Date minDate, java.util.Date dateInBetween, java.util.Date maxDate)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### create

          public static TimeFrameValidator create(long acceptedClockSkew)

      Parameters:
        `acceptedClockSkew` - amount of time in millis that is acceptable to cross a certain time (before or after).
      Returns:
        an instance with the given clock skew preconfig

    - #### validate

          public boolean validate(java.util.Date minDate,
                                  java.util.Date dateInBetween,
                                  java.util.Date maxDate)

      Parameters:
        `minDate` - if null, no minimal check is done
        `dateInBetween` - if null, current date is used
        `maxDate` - if null, no maximum check is done
      Returns:
        true if dateInBetween is not before minDate or after maxDate, with a clockSkew

Copyright © 2025 eHealth. All rights reserved.