# This is a date_filter plug-in. # START and END are the beginning and end of the hour, or minute, or second, specified by date/time. second = { label = "second" usage = "dd/mmm/yyyy hh:mm:ss" 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])[^-,0-9A-Za-z]?([0-9][0-9])[^-,0-9A-Za-z]?([0-9][0-9])$" start = ` string day = $1; string month = $2; string year = $3; string hour = $4; string minute = $5; string second = $6; # Remember what unit we're using remember_date_unit('second'); # Remember the decomposition set_decomposition_year(year); set_decomposition_month(month); set_decomposition_day(day); set_decomposition_hour(hour); set_decomposition_minute(minute); set_decomposition_second(second); # Convert month to proper case month = uppercase(substr(month, 0, 1)) . substr(month, 1); # Add leading 0 to one-digit dates if (matches_regular_expression(day, "^[0-9]$")) then day = '0' . day; # Add leading 0 to one-digit hours if (matches_regular_expression(hour, "^[0-9]$")) then hour = '0' . hour; # Build the first second of this hour day . "/" . month . "/" . year . ' ' . hour . ':' . minute . ':' . second; ` end = start }