<future-time>

Purpose/Function

Specialized date-time computation for accessing data related to WRF. Rounds the current time to the closest preceding interval using hourInterval; if offset is non-zero, computes the date-time at that number of hours from the closest interval.

Examples:
  • Setting hourInterval to '3' will set the intervals at 0:00, 3:00, 6:00, 9:00, 12:00, 15:00, 18:00, 21:00; if the current time is 17:43, the result of this computation will be 15:00.
  • Setting offset to -12 will then give 3:00. Setting it to 9 will give 0:00 of the following day.
  • Not setting either hourInterval or offset gives a result similar to the <parse-date> task.

Attributes

NAME

TYPE

DEFAULT VALUE

DESCRIPTION

hourInterval

long

0

number of hours in an interval (should be non-negative)

localtime

boolean

false

compute the date-time using local time rather than GMTz

offset

long

0

number of hours after (positive) or before (negative) the base computed using hourInterval

Elements

None.

ReturnValues

DEFAULT NAME

TYPE

future-time-year

java.lang.String

future-time-month

java.lang.String

future-time-date

java.lang.String

future-time-hour

java.lang.String

future-time-minute

java.lang.String

future-time-second

java.lang.String

As with <parse-date>, leading-zeros are preserved for each of the values returned.

Examples

<ogrescript>
   ...
   <future-time offset="0" hourInterval="${ncep_cycle_interval}">
      <return-value assignedName="year1" defaultName="future-time-year"/>
      <return-value assignedName="month1" defaultName="future-time-month"/>
      <return-value assignedName="day1" defaultName="future-time-date"/>
      <return-value assignedName="hour1" defaultName="future-time-hour"/>
   </future-time>
   ...
</ogrescript>
  • No labels