你可以试试
index(A[diff(A)<0]) #[1] "2014-12-31" "2015-01-04" index(A[diff(A)==1]) #[1] "2014-12-29" "2015-01-02"