feat: add cJSON and SQLite amalgamation source files under deps/
Add the cJSON library (cJSON.c, cJSON.h) and SQLite amalgamation (sqlite3.c, sqlite3.h, sqlite3ext.h, shell.c) as vendored dependencies in the deps/ directory for use by the project build system.
This commit is contained in:
Vendored
+28
@@ -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
|
||||
Reference in New Issue
Block a user