extract fn to-sorted-date-index
to be continue...