소스 검색

docs: an omitted amount still means zero, and negative offsets bottom out at -12:00

fszontagh 1 개월 전
부모
커밋
f6e64c5885
1개의 변경된 파일과 6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      docs/superpowers/plans/2026-08-04-tier-1-nodes.md

+ 6 - 2
docs/superpowers/plans/2026-08-04-tier-1-nodes.md

@@ -2698,7 +2698,8 @@ function offsetMinutes(offset) {
     }
     }
     const hours = parseInt(match[2], 10);
     const hours = parseInt(match[2], 10);
     const mins = parseInt(match[3], 10);
     const mins = parseInt(match[3], 10);
-    if (hours > 14 || mins > 59) {
+    const maxHours = match[1] === '-' ? 12 : 14;
+    if (hours > maxHours || mins > 59) {
         throw new Error('Date and Time: offset "' + offset +
         throw new Error('Date and Time: offset "' + offset +
             '" is out of range. Real offsets run from -12:00 to +14:00');
             '" is out of range. Real offsets run from -12:00 to +14:00');
     }
     }
@@ -2781,7 +2782,10 @@ async function execute(config, input, context) {
         return result;
         return result;
     }
     }
 
 
-    const amount = Number(config.amount);
+    const rawAmount = config.amount === undefined || config.amount === null || config.amount === ''
+        ? 0
+        : config.amount;
+    const amount = Number(rawAmount);
     if (isNaN(amount)) {
     if (isNaN(amount)) {
         throw new Error('Date and Time: amount must be a number, got "' + config.amount + '"');
         throw new Error('Date and Time: amount must be a number, got "' + config.amount + '"');
     }
     }