Skip to content

Commit

Permalink
Merge pull request #211 from usnistgov/fix/trunc-dates
Browse files Browse the repository at this point in the history
Apply date truncation to release date, too
  • Loading branch information
RayPlante authored Oct 8, 2021
2 parents 7e9c920 + d4d1371 commit 13976b3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion angular/src/app/landing/version/version.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
(click)="closeHistory = !closeHistory; clickHistory = expandHistory();"></i>
</span>
<span class="" *ngIf="record.issued" style="padding-right: 10pt;"> Released:
<strong>{{record.issued}}</strong></span>
<strong>{{record.issued.slice(0,10)}}</strong></span>
<span class="" *ngIf="record.modified" style="padding-right: 10pt;"> Last modified:
<strong>{{record.modified.slice(0,10)}}</strong></span>
<div class="card customcard" [collapse]="!closeHistory">
Expand Down
6 changes: 4 additions & 2 deletions angular/src/app/landing/version/version.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ describe('VersionComponent', () => {
let spans = cmpel.querySelectorAll("span");
expect(spans[0].textContent).toContain("Version:");
expect(spans[0].textContent).toContain("1.0.1");
expect(spans[2].textContent).toContain("Last modified:");
expect(spans[2].textContent).toContain("2019-03-28");
expect(spans[2].textContent).toContain("Released:");
expect(spans[2].textContent).toContain("2019-04-05");
expect(spans[3].textContent).toContain("Last modified:");
expect(spans[3].textContent).toContain("2019-03-28");
});

it('test renderRelAsLink()', () => {
Expand Down
5 changes: 3 additions & 2 deletions angular/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ export const testdata: {} = {
"hasEmail": "mailto:[email protected]",
"fn": "Patricia Flanagan"
},
"modified": "2019-03-28",
"modified": "2019-03-28 12:24:31",
"issued": "2019-04-05T16:04:26.0",
"ediid": "26DEA39AD677678AE0531A570681F32C1449",
"landingPage": "https://www.nist.gov/itl/iad/image-group/special-database-32-multiple-encounter-dataset-meds",
"version": "1.0.1",
Expand All @@ -78,7 +79,7 @@ export const testdata: {} = {
},
{
"version": "1.0.1",
"issued": "2019-03-28 00:00:00",
"issued": "2019-03-28 12:24:31",
"@id": "ark:/88434/mds0000fbkmds1103vzr",
"location": "https://data.nist.gov/od/id/ark:/88434/mds0000fbk",
"description": "metadata update"
Expand Down

0 comments on commit 13976b3

Please sign in to comment.