Esempio n. 1
0
def housenumbers_diff_last_modified(relation: areas.Relation) -> str:
    """Gets the update date for missing/additional housenumbers."""
    t_ref = util.get_timestamp(
        relation.get_files().get_ref_housenumbers_path())
    t_osm = util.get_timestamp(
        relation.get_files().get_osm_housenumbers_path())
    return webframe.format_timestamp(max(t_ref, t_osm))
Esempio n. 2
0
def ref_housenumbers_last_modified(relations: areas.Relations,
                                   name: str) -> str:
    """Gets the update date for missing house numbers."""
    relation = relations.get_relation(name)
    t_ref = get_timestamp(relation.get_files().get_ref_housenumbers_path())
    t_housenumbers = get_timestamp(
        relation.get_files().get_osm_housenumbers_path())
    return webframe.format_timestamp(max(t_ref, t_housenumbers))
Esempio n. 3
0
def ref_streets_last_modified(relation: areas.Relation) -> str:
    """Gets the update date for missing streets."""
    t_ref = get_timestamp(relation.get_files().get_ref_streets_path())
    t_osm = get_timestamp(relation.get_files().get_osm_streets_path())
    return webframe.format_timestamp(max(t_ref, t_osm))
Esempio n. 4
0
def get_last_modified(path: str) -> str:
    """Gets the update date string of a file."""
    return webframe.format_timestamp(get_timestamp(path))