def _feed_calendar_span(gtfs, stats):
n_feeds = _n_gtfs_sources(gtfs)[<NUM_LIT:0>]<EOL>max_start = None<EOL>min_end = None<EOL>if n_feeds > <NUM_LIT:1>:<EOL><INDENT>for i in range(n_feeds):<EOL><INDENT>feed_key = "<STR_LIT>" + str(i) + "<STR_LIT:_>"<EOL>start_key = feed_key + "<STR_LIT>"<EOL>end_key = feed_key + "<STR_LIT>"<EOL>calendar_span = gtfs.conn.cursor().execute(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>', (feed_key + '<STR_LIT:%>',)).fetchone()<EOL>stats[start_key] = calendar_span[<NUM_LIT:0>]<EOL>stats[end_key] = calendar_span[<NUM_LIT:1>]<EOL>if calendar_span[<NUM_LIT:0>] is not None and calendar_span[<NUM_LIT:1>] is not None:<EOL><INDENT>if not max_start and not min_end:<EOL><INDENT>max_start = calendar_span[<NUM_LIT:0>]<EOL>min_end = calendar_span[<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>if gtfs.get_day_start_ut(calendar_span[<NUM_LIT:0>]) > gtfs.get_day_start_ut(max_start):<EOL><INDENT>max_start = calendar_span[<NUM_LIT:0>]<EOL><DEDENT>if gtfs.get_day_start_ut(calendar_span[<NUM_LIT:1>]) < gtfs.get_day_start_ut(min_end):<EOL><INDENT>min_end = calendar_span[<NUM_LIT:1>]<EOL><DEDENT><DEDENT><DEDENT><DEDENT>stats["<STR_LIT>"] = max_start<EOL>stats["<STR_LIT>"] = min_end<EOL><DEDENT>else:<EOL><INDENT>stats["<STR_LIT>"] = stats["<STR_LIT>"]<EOL>stats["<STR_LIT>"] = stats["<STR_LIT>"]<EOL><DEDENT>return stats<EOL>
Computes the temporal coverage of each source feed

Parameters
----------
gtfs: gtfspy.GTFS object
stats: dict
    where to append the stats

Returns
-------
stats: dict