# This is a date_filter plug-in. # START is the beginning of the specified hour; END is the end of the hour. hour = { label = "hour" usage = "dd/mmm/yyyy hh" regular_expression = "^([0-9]+)[^-,0-9A-Za-z]?([A-Za-z]+)[^-,0-9A-Za-z]?([0-9]+)[^-,0-9A-Za-z]([0-9][0-9])$" start = ` string day = $1; string month = $2; string year = $3; string hour = $4; day = convert_day(day); month = convert_month(month); year = convert_year(year); hour = convert_hms(hour); # Remember what unit we're using remember_date_unit('hour'); # Remember the decomposition set_decomposition_year(year); set_decomposition_month(month); set_decomposition_day(day); set_decomposition_hour(hour); # Build the first second of this hour v.start = day . "/" . month . "/" . year . ' ' . hour . ':00:00'; v.start; ` end = `substr(v.start, 0, 14) . ":59:59"` }