Class TimeSpecHelper

  • All Implemented Interfaces:

    @Named() 
    public final class TimeSpecHelper
    
                        

    There are use-cases when we want to specify particular offsets for target actions in configs, e.g. T + 1 stands for tomorrow, T for today, etc. This method allows to get target time for the offset defined by the given spec.

    Supported formats:

    • T - current time from ClockProvider

    • T - N - current time minus N days, e.g. T - 1, T - 2, etc

    • T + N - current time minus N days, e.g. T + 1, T + 2, etc

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final ZonedDateTime getTime(String timeSpec)
      final ZonedDateTime maybeGetTime(String timeSpec)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait