common-domain-model
common-domain-model copied to clipboard
Date and Time types and model functions
To properly work with ISO date and time we need a low level time recordType. This will required low level changes to Rosetta DSL:
recordType time: hour int min int sec int msec int
recordType ISODateTime: date time offset
We also need functions to convert to and from ISODateTime:
func FormatISODateTime: inputs: date date (1..1) time time (1..1) offset int (1..1) formatType ISOFormatTypeEnum (0..1) output: isoDateTime string (1..1) set IsoDateTime: date->year + '-' + date->month + '-' +date-> day + 'T' + time->hour + ':' + time->min + ":" + time->sec + ":" + time->msec + "Z"
...
other formats
with UTC Offset : [+/-] offset
func ConvertISODateTime:
inputs:
isoDateTimeStr string (1..1)
output:
isoDateTime ISODateTime (1..1)