Given the time range for the main search, I need to generate a sub search for the preceding, same length period.
For example :
If the user specified last 30 days on the time picker then for the main search it would be [-30d, now] and for the
comparison I need to be able to come up with [-60d,-30d].
If the user picked specific dates range [date1,date2] for the main search, then for the sub search I need to calculate the [date1- (date2-date1), date1]
So finally I can come up with : my_search | append [my_search earliest=??? latest=???]
Thanks
... View more