From 65db5165fd1d5d51c1cb212f509e19122213bfb3 Mon Sep 17 00:00:00 2001 From: Xiaoqi Zhao Date: Mon, 7 Oct 2024 15:39:43 +0800 Subject: [PATCH] add 05-02-08 --- ch05/05-02/05-02-08/ex298.ttl | 11 +++++++++++ ch05/05-02/05-02-08/ex299.rq | 17 +++++++++++++++++ ch05/05-02/05-02-08/ex301.rq | 14 ++++++++++++++ ch05/05-02/05-02-08/ex303.rq | 12 ++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 ch05/05-02/05-02-08/ex298.ttl create mode 100644 ch05/05-02/05-02-08/ex299.rq create mode 100644 ch05/05-02/05-02-08/ex301.rq create mode 100644 ch05/05-02/05-02-08/ex303.rq diff --git a/ch05/05-02/05-02-08/ex298.ttl b/ch05/05-02/05-02-08/ex298.ttl new file mode 100644 index 0000000..1e4c935 --- /dev/null +++ b/ch05/05-02/05-02-08/ex298.ttl @@ -0,0 +1,11 @@ +# filename: ex298.ttl + +@prefix xsd: . +@prefix d: . +@prefix t: . + +d:meeting1 t:starts "2024-10-14T12:30:00.000-05:00"^^xsd:dateTime . + +d:meeting2 t:starts "2024-10-15T12:30:00"^^xsd:dateTime . + +d:meeting3 t:starts "2024-10-15T12:30:00+08:00"^^xsd:dateTime . \ No newline at end of file diff --git a/ch05/05-02/05-02-08/ex299.rq b/ch05/05-02/05-02-08/ex299.rq new file mode 100644 index 0000000..f95627f --- /dev/null +++ b/ch05/05-02/05-02-08/ex299.rq @@ -0,0 +1,17 @@ +# filename: ex299.rq + +PREFIX d: +PREFIX t: +PREFIX xsd: + +SELECT * +FROM +WHERE { + ?mtg t:starts ?startTime . + BIND (year(?startTime) AS ?yearTest) + BIND (month(?startTime) AS ?monthTest) + BIND (day(?startTime) AS ?dayTest) + BIND (hours(?startTime) AS ?hoursTest) + BIND (minutes(?startTime) AS ?minutesTest) + BIND (seconds(?startTime) AS ?secondsTest) +} \ No newline at end of file diff --git a/ch05/05-02/05-02-08/ex301.rq b/ch05/05-02/05-02-08/ex301.rq new file mode 100644 index 0000000..5c7c8d5 --- /dev/null +++ b/ch05/05-02/05-02-08/ex301.rq @@ -0,0 +1,14 @@ +# filename: ex301.rq + +PREFIX d: +PREFIX t: +PREFIX xsd: + +SELECT * +FROM +WHERE { + ?mtg t:starts ?startTime . + BIND (timezone(?startTime) AS ?timezoneTest) + BIND (tz(?startTime) AS ?tzTest) +} +ORDER BY ?mtg \ No newline at end of file diff --git a/ch05/05-02/05-02-08/ex303.rq b/ch05/05-02/05-02-08/ex303.rq new file mode 100644 index 0000000..8b700d7 --- /dev/null +++ b/ch05/05-02/05-02-08/ex303.rq @@ -0,0 +1,12 @@ +# filename: ex303.rq + +PREFIX xsd: + +SELECT * +WHERE { + BIND (now() AS ?currentTime) + BIND (seconds(?currentTime) AS ?currentSeconds) + BIND (year(?currentTime) AS ?currentYear) + BIND (timezone(?currentTime) AS ?currentTimezone) +} +ORDER BY ?mtg \ No newline at end of file