Skip to content

Commit

Permalink
Merge pull request #1463 from NASA-AMMOS/refactor/sequence-time-utils
Browse files Browse the repository at this point in the history
Allow eDSL relative times to have Days (DDD).
  • Loading branch information
dandelany authored Jun 26, 2024
2 parents 0c4a76d + 1e66caa commit e1fc148
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion sequencing-server/src/lib/codegen/CommandEDSLPreface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3287,7 +3287,6 @@ export function hmsToDuration(hms: HMS_STRING, epoch: boolean = false): Temporal

if (!epoch) {
if (isNegative) {throw new Error(`Signed time (+/-) is not allowed for Relative Times: ${hms}`);}
if (daysNum !== 0) {throw new Error(`Day (DDD) is not allowed for Relative Times: ${hms}`);}
}
return Temporal.Duration.from({
days: isNegative ? -daysNum : daysNum,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3290,7 +3290,6 @@ export function hmsToDuration(hms: HMS_STRING, epoch: boolean = false): Temporal

if (!epoch) {
if (isNegative) {throw new Error(\`Signed time (+/-) is not allowed for Relative Times: \${hms}\`);}
if (daysNum !== 0) {throw new Error(\`Day (DDD) is not allowed for Relative Times: \${hms}\`);}
}
return Temporal.Duration.from({
days: isNegative ? -daysNum : daysNum,
Expand Down

0 comments on commit e1fc148

Please sign in to comment.