x = as.xts(1:30,Sys.Date()+1:30)
# extract smallest value date
( time.trough <- time(x)[ x == min(x) ] )
# extract largest value date
( time.peak <- time(x)[ x == max(x) ] )
# extract smallest value date
( time.trough <- time(x)[ x == min(x) ] )
# extract largest value date
( time.peak <- time(x)[ x == max(x) ] )
# extract particular value date
( time.one <- time(x)[ x == 1 ] )
( time.one <- time(x)[ x == 1 ] )