feat: allow saving to same SR series (#4889)
This commit is contained in:
1 parent
7b40963997
commit
62e5a62066
9 files changed
+167
-63
No files matched your search
@@ -0,0 +1,20 @@
|
||||
export const getSeriesDateTime = (jsDate: Date = new Date()) => {
|
||||
const dicomDateTime = getDicomDateTime(jsDate);
|
||||
return {
|
||||
SeriesDate: dicomDateTime.date,
|
||||
SeriesTime: dicomDateTime.time,
|
||||
};
|
||||
};
|
||||
|
||||
export const getDicomDateTime = (jsDate: Date = new Date()) => {
|
||||
const month = String(jsDate.getUTCMonth() + 1).padStart(2, '0');
|
||||
const day = String(jsDate.getUTCDate()).padStart(2, '0');
|
||||
const year = String(jsDate.getUTCFullYear()).padStart(4, '0');
|
||||
const date = `${year}${month}${day}`;
|
||||
const hours = String(jsDate.getUTCHours()).padStart(2, '0');
|
||||
const minutes = String(jsDate.getUTCMinutes()).padStart(2, '0');
|
||||
const seconds = String(jsDate.getUTCSeconds()).padStart(2, '0');
|
||||
const time = `${hours}${minutes}${seconds}`;
|
||||
|
||||
return { date, time };
|
||||
};
|
||||
Reference in new issue
Block a user