phase: 20.49 COMPLETE; 20.50 Flow+String minimal reps; 20.51 selfhost v0/v1 minimal (Option A/B); hv1-inline binop/unop/copy; docs + run_all + CURRENT_TASK -> 21.0

This commit is contained in:
nyash-codex
2025-11-06 15:41:52 +09:00
parent 2dc370223d
commit 77d4fd72b3
1658 changed files with 6288 additions and 2612 deletions

View File

@ -0,0 +1,43 @@
// test_datetime_box.hako - DateTimeBox functionality test
// Phase 3: DateTimeBox implementation validation
print("📅 Testing DateTimeBox implementation...")
// Basic DateTimeBox creation
local now, timestamp_dt, parsed_dt, result
// Test 1: Current time creation
now = new DateTimeBox()
print("Current time: " + now.toString())
// Test 2: Timestamp creation
timestamp_dt = new DateTimeBox(1640995200) // 2022-01-01 00:00:00 UTC
print("From timestamp: " + timestamp_dt.toString())
// Test 3: Date component extraction
result = now.year()
print("Current year: " + result.toString())
result = now.month()
print("Current month: " + result.toString())
result = now.day()
print("Current day: " + result.toString())
result = now.hour()
print("Current hour: " + result.toString())
result = now.minute()
print("Current minute: " + result.toString())
result = now.second()
print("Current second: " + result.toString())
// Test 4: Date arithmetic
result = now.addDays(7)
print("7 days from now: " + result.toString())
result = now.addHours(24)
print("24 hours from now: " + result.toString())
print("✅ DateTimeBox Phase 3 tests completed!")