{"size": 678, "ext": "js", "max_stars_repo_path": "trekkerFrontend/src/components/visit.js", "max_stars_repo_name": "kelypso/trekker", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "trekkerFrontend/src/components/visit.js", "max_issues_repo_name": "kelypso/trekker", "max_issues_repo_issues_event_min_datetime": "2020-05-22T16:32:20.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T00:20:58.000Z", "max_forks_repo_path": "trekkerFrontend/src/components/visit.js", "max_forks_repo_name": "helloklow/trekker", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 8, "max_forks_count": null, "avg_line_length": 27.12, "max_line_length": 83, "alphanum_fraction": 0.4896755162}
class Visit {
    constructor(visit) {
        this.visitPark = visit.park
        this.date = visit.date
        this.notes = visit.notes
        this.park = visit.park_id
    }

    visitHTML() { 
        return (`
            <div id='visit-details' class='visit-card'>
                <h5 class='visit-park center-text'>${this.visitPark.name}</h5>
                <p class='visit-date center-text'>${this.formatDate(this.date)}</p>
                <p class='visit-notes'>${this.notes}</p>
            </div>             
        `)
    }

    formatDate(date) {
        const d = date.split('-')
        const newDate = d[1]+'/'+d[2]+'/'+d[0]
        return newDate
    }

}