Skip to content

Commit b071188

Browse files
fix: datetime repr (#360)
* fix: datetime repr * Update docs --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 33e9259 commit b071188

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
## Dicom Image Toolkit for CornerstoneJS
1010

11-
### Current version: 2.5.4
11+
### Current version: 2.5.5
1212

13-
### Latest Published Release: 2.5.4
13+
### Latest Published Release: 2.5.5
1414

1515
This library provides common DICOM functionalities to be used in web-applications: it's wrapper that simplifies the use of cornerstone-js environment.
1616

dist/larvitar.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/larvitar.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/documentation/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ <h3> </h3>
7474
<h1 id="larvitar">Larvitar</h1>
7575
<p><a href="https://github.com/dvisionlab/Larvitar"><img src="https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&amp;prefix=%E2%89%A5&amp;suffix=%25&amp;query=$.typeCoverage.atLeast&amp;uri=https%3A%2F%2Fraw.githubusercontent.com%2Fplantain-00%2Ftype-coverage%2Fmaster%2Fpackage.json" alt="type-coverage"></a></p>
7676
<h2 id="dicom-image-toolkit-for-cornerstonejs">Dicom Image Toolkit for CornerstoneJS</h2>
77-
<h3 id="current-version%3A-2.5.4">Current version: 2.5.4</h3>
78-
<h3 id="latest-published-release%3A-2.5.4">Latest Published Release: 2.5.4</h3>
77+
<h3 id="current-version%3A-2.5.5">Current version: 2.5.5</h3>
78+
<h3 id="latest-published-release%3A-2.5.5">Latest Published Release: 2.5.5</h3>
7979
<p>This library provides common DICOM functionalities to be used in web-applications: it's wrapper that simplifies the use of cornerstone-js environment.</p>
8080
<h2 id="features%3A">Features:</h2>
8181
<ul>

docs/examples/larvitar.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

imaging/imageTags.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const parseDateTag = function (tagValue: string) {
9696
const day = tagValue.substring(6, 8);
9797
const date = new Date(Date.UTC(parseInt(year), parseInt(month) - 1, parseInt(day)));
9898
if (isValidDate(date) === true) {
99-
return date.toISOString();
99+
return date.toISOString().split('T')[0];
100100
} else {
101101
return tagValue;
102102
}
@@ -118,17 +118,17 @@ const parseDateTimeTag = function (tagValue: string) {
118118
const min = tagValue.substring(10, 12);
119119
const sec = tagValue.substring(12, 14);
120120
// const msec = tagValue.substring(15, 21);
121-
const date = new Date(
121+
const date = new Date(Date.UTC(
122122
parseInt(year),
123123
parseInt(month) - 1,
124124
parseInt(day),
125125
parseInt(hour),
126126
parseInt(min),
127127
parseInt(sec),
128128
parseInt(sec)
129-
);
129+
));
130130
if (isValidDate(date) === true) {
131-
return date.toISOString();
131+
return date.toISOString().replace('T', ' ').replace('Z', '');
132132
} else {
133133
return tagValue;
134134
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"medical",
77
"cornerstone"
88
],
9-
"version": "2.5.4",
9+
"version": "2.5.5",
1010
"description": "typescript library for parsing, loading, rendering and interacting with DICOM images",
1111
"repository": {
1212
"url": "https://github.com/dvisionlab/Larvitar.git",

0 commit comments

Comments
 (0)