from datetime import datetime
# import numpy as np

# ---------------------
# record as dictionary:  -->  record['value'] & record['date']
# ---------------------

def title():
    return "" # title of the function

def abstract():
    return "" # short description of the function

def inputs():
    return [['startdate','Start date for data collection','string'],
            ['enddate','End date for data collection','string'],
            ['parameterid','Parameter ID','string'],
            ['locations','Locations selected for timeseries display','string']] # required inputs with tooltips and data types

def process(identifier, parameters, records):
    for record in records:
        record['date'] = datetime.strftime(record['date'], "%Y-%m-%d %H:%M:%S") # change datetime.datetime to str for json.dumps()
        
    return records
