]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/calendar/calendar-tests.factor
calendar: Add sunrise, sunset, solar-noon
[factor.git] / basis / calendar / calendar-tests.factor
index 5990f83769c5401170066165e57aa7f335bf0b5c..0cac2525195236272e3b81702cad528fc7a9a7fa 100644 (file)
@@ -443,3 +443,22 @@ IN: calendar
         { second 59+999/1000 }
     }
 } [ 2023 4 13 <date-gmt> start-of-week dup end-of-week ] unit-test
+
+{
+    T{ timestamp
+        { year 2024 }
+        { month 2 }
+        { day 15 }
+        { hour 7 }
+    }
+} [ 2024 02 15 <date-gmt> 48.87 2.67 sunrise >gmt ] unit-test
+
+{
+    T{ timestamp
+        { year 2024 }
+        { month 2 }
+        { day 15 }
+        { hour 17 }
+        { minute 7 }
+    }
+} [ 2024 02 15 <date-gmt> 48.87 2.67 sunset >gmt ] unit-test