initial commit
This commit is contained in:
47
_bmad-output/implementation-artifacts/4-2-time-math.md
Normal file
47
_bmad-output/implementation-artifacts/4-2-time-math.md
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
epic: 4
|
||||
story: 4.2
|
||||
title: "Time Math"
|
||||
status: draft
|
||||
---
|
||||
|
||||
## Epic 4 — Date, Time & Time Zones
|
||||
**Goal:** Full date/time math, business day calculations, and timezone awareness.
|
||||
|
||||
### Story 4.2: Time Math
|
||||
|
||||
As a CalcPad user,
|
||||
I want to add and subtract durations from times and calculate durations between times,
|
||||
So that I can compute meeting end times, elapsed time, and scheduling math.
|
||||
|
||||
**Acceptance Criteria:**
|
||||
|
||||
**Given** the expression `3:35 am + 9 hours 20 minutes`
|
||||
**When** the engine evaluates it
|
||||
**Then** the result is `12:55 pm`
|
||||
|
||||
**Given** the expression `3:35 PM + 9 hours 20 minutes`
|
||||
**When** the engine evaluates it
|
||||
**Then** the result is `12:55 AM` (next day)
|
||||
**And** the result indicates the day rollover if applicable
|
||||
|
||||
**Given** the expression `14:30 - 2 hours 45 minutes`
|
||||
**When** the engine evaluates it in 24-hour mode
|
||||
**Then** the result is `11:45`
|
||||
|
||||
**Given** the user's time format preference is 12-hour
|
||||
**When** time results are displayed
|
||||
**Then** they use AM/PM notation
|
||||
|
||||
**Given** the user's time format preference is 24-hour
|
||||
**When** time results are displayed
|
||||
**Then** they use 24-hour notation (e.g., `14:30` instead of `2:30 PM`)
|
||||
|
||||
**Given** the expression `9:00 AM to 5:30 PM`
|
||||
**When** the engine evaluates it
|
||||
**Then** the result is `8 hours 30 minutes`
|
||||
|
||||
**Given** the expression `11:00 PM to 2:00 AM`
|
||||
**When** the engine evaluates it
|
||||
**Then** it assumes the time crosses midnight
|
||||
**And** the result is `3 hours`
|
||||
Reference in New Issue
Block a user