Skip to content

Commit

Permalink
Added the information update date
Browse files Browse the repository at this point in the history
  • Loading branch information
davidteather committed Aug 26, 2020
1 parent bd0d081 commit 8e319f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ <h3 class="text-center">Negative: {{covid_data.madison.negative}}</h3>
</div>

<div class="row" style="width:100%;margin-top:20px;">
<h6 class="text-center mx-auto">Last Updated: 08/25/2020</h6>
<h6 class="text-center mx-auto">Last Updated: {{covid_data.updated}}</h6>
</div>

</div>
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export class LandingComponent implements OnInit {
'16.03', '16.04', '17.04', '17.05', '19', '18.02', '18.04', '21',
'22', '102', '23.01', '23.02', '24.01', '24.02', '25', '26.01',
'20', '27', '30.01', '28', '103', '31', '29', '104'];
date_obj: any;

covid_data: any;

Expand All @@ -30,6 +31,7 @@ export class LandingComponent implements OnInit {
})

dataService.getData().subscribe((results) => {
this.date_obj = new Date(results.features[0].attributes.DATE)
this.covid_data = {
'on_campus': {
"positive": 0,
Expand All @@ -42,7 +44,8 @@ export class LandingComponent implements OnInit {
'madison': {
"positive": 0,
"negative": 0
}
},
'updated': (this.date_obj.getMonth()+1) + "-" + this.date_obj.getDate() + "-" + this.date_obj.getFullYear()
}

function refine_number(inp) {
Expand Down

0 comments on commit 8e319f6

Please sign in to comment.