function filterSequences(sequences) {
        var fromDate = context.photos().fromDate();
        var toDate = context.photos().toDate();

        if (fromDate) {
            sequences = sequences.filter(function(sequence) {
                return new Date(sequence.properties.capture_time).getTime() >= new Date(fromDate).getTime().toString();
            });
        }
        if (toDate) {
            sequences = sequences.filter(function(sequence) {
                return new Date(sequence.properties.capture_time).getTime() <= new Date(toDate).getTime().toString();
            });
        }

        return sequences;
    }
Filters sequences
@param {*} sequences
@returns array of filtered sequences