New modules.
WrenCI / linux (push) Waiting to run
WrenCI / mac (push) Waiting to run
WrenCI / windows (push) Waiting to run

This commit is contained in:
2026-01-24 19:35:43 +01:00
parent 1a08b3adf0
commit 236d69c2d7
118 changed files with 315687 additions and 6 deletions
+28
View File
@@ -0,0 +1,28 @@
import "datetime" for DateTime, Duration
var now = DateTime.now()
System.print(now.year >= 2024) // expect: true
System.print(now.month >= 1 && now.month <= 12) // expect: true
System.print(now.day >= 1 && now.day <= 31) // expect: true
System.print(now.hour >= 0 && now.hour <= 23) // expect: true
System.print(now.minute >= 0 && now.minute <= 59) // expect: true
System.print(now.second >= 0 && now.second <= 59) // expect: true
var ts = DateTime.fromTimestamp(0)
System.print(ts.year) // expect: 1970
var d1 = Duration.fromSeconds(60)
System.print(d1.seconds) // expect: 60
System.print(d1.minutes) // expect: 1
var d2 = Duration.fromMinutes(2)
System.print(d2.seconds) // expect: 120
var d3 = Duration.fromHours(1)
System.print(d3.minutes) // expect: 60
var d4 = Duration.fromDays(1)
System.print(d4.hours) // expect: 24
var sum = d1 + d2
System.print(sum.seconds) // expect: 180