From 9fe7c6f9697b5bbf3041261fdc60040e75cc674f Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Sun, 15 Nov 2026 16:11:39 -0800 Subject: Split off chapter 31 Ch 32 will be focused on compiler performance issues. --- chapter32/src/main/smp/sys/time/DateTime.smp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 chapter32/src/main/smp/sys/time/DateTime.smp (limited to 'chapter32/src/main/smp/sys/time/DateTime.smp') diff --git a/chapter32/src/main/smp/sys/time/DateTime.smp b/chapter32/src/main/smp/sys/time/DateTime.smp new file mode 100644 index 00000000..53b6688e --- /dev/null +++ b/chapter32/src/main/smp/sys/time/DateTime.smp @@ -0,0 +1,13 @@ +// Calendar view of an instant. Month/day start at 1; weekday is Sunday=0. +// year==0 means out of the supported calendar range (years 1 through 9999). + +// All values default zero/false +struct DateTime { + int year, month, day; + int hour, minute, second, millisecond; + int weekday, offsetSeconds; + bool daylight; +}; + +// Factory in the defining unit, so callers need no forward instance type. +val empty = { -> new DateTime(); }; -- cgit v1.2.3