Time Specifications

Some VOV procedures and commands accept as input a time specification, which is a string that contains a mixture of digits and the letters s m h d w.

The letters are defined as follows:
Specification
Explanation
a
Seconds (default)
m
Minutes
h
Hours
d
Days (24 hours)
w
Weeks (168=7*24 hours)

The time specifications are case insensitive. The d and w specifications ignore that with daylight-saving some days may be 23 hours and other days may be 25 hours.

Examples of TimeSpecs

Specification
Explanation
60
60 seconds
2M
2 minutes, i.e. 120 seconds
3h30m
3 hours and 30 minutes, i.e. 12600 seconds

You can convert a time specification to seconds with the Tcl procedure VovParseTimeSpec. Conversely, you can convert an integer to a time specification, but with some loss of precision, with the procedure vtk_time_pp.

Some utilities (such as ftlm_batch_report) require a time interval specification. Time intervals can be expressed as follows:
  • past hour
  • today
  • yesterday
  • this week
  • last week
  • past week
  • this month
  • this month full
  • last month
  • past month
  • past 30days
  • this quarter
  • last quarter
  • this year
  • last year
  • YYYY, such as 2016, would be the entire year of 2016
  • YYYYMM, such as 201016, which would be the month of December in 2016
  • YYYYMMDD, such as 20100116, which would be Jan 15 2016
  • YYYYwWW, such as 2017w4, which would be week 4 in year 2017
  • Month YYYY. Example: Sep 2017
  • start-finish, where on each side of the '-' is a timestamp specification that is parsed by VovScanClock. Example: 20090101-20090301

The conversion to a start-end pair is performed by the Tcl procedure VovDate::computeSymbolicInterval