I noticed that in the DatasetVersionInfo model, the timestamps use inconsistent types:
|
createTime: Date |
|
/** |
|
* The timestamp of the last update to this dataset version. |
|
* Format: ISO 8601 string (e.g., "2023-06-01T12:34:56Z"). |
|
* Used for optimistic concurrency control to detect concurrent updates. |
|
*/ |
|
lastUpdateTime: string |
|
releaseTime?: Date |
releaseTime and createTime are represented as Date objects, while lastUpdateTime is represented as an ISO 8601 string and not transformed into a Date object:
|
createTime: new Date(versionPayload.createTime), |
|
lastUpdateTime: versionPayload.lastUpdateTime, |
|
releaseTime: new Date(versionPayload.releaseTime), |
The return values from the Dataverse API for retrieving a dataset version are all consistently ISO 8601 strings:
I was wondering what the reason for this is, or whether this inconsistency should be cleaned up? (If so, I'd be open to opening a PR for that)
I noticed that in the
DatasetVersionInfomodel, the timestamps use inconsistent types:dataverse-client-javascript/src/datasets/domain/models/Dataset.ts
Lines 25 to 32 in 0043ddd
releaseTimeandcreateTimeare represented asDateobjects, whilelastUpdateTimeis represented as an ISO 8601 string and not transformed into aDateobject:dataverse-client-javascript/src/datasets/infra/repositories/transformers/datasetTransformers.ts
Lines 237 to 239 in 0043ddd
The return values from the Dataverse API for retrieving a dataset version are all consistently ISO 8601 strings:
I was wondering what the reason for this is, or whether this inconsistency should be cleaned up? (If so, I'd be open to opening a PR for that)