]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/calendar/calendar-docs.factor
stomp: unescape-header and adjust-stomp-version
[factor.git] / basis / calendar / calendar-docs.factor
index b7f99d15488c13f1156e15182e5e31ad676a261c..87d5197e839d93d5c10d4b0b73eb635076115e53 100644 (file)
@@ -1,5 +1,5 @@
 ! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
+! See https://factorcode.org/license.txt for BSD license.
 USING: help.markup help.syntax kernel math math.order ;
 IN: calendar
 
@@ -493,6 +493,29 @@ HELP: since-1970
     { "timestamp" timestamp } }
 { $description "Adds the duration to the beginning of Unix time and returns the result as a timestamp." } ;
 
+HELP: sunrise
+{ $values
+    { "timestamp" timestamp }
+    { "latitude" real }
+    { "longitude" real }
+    { "new-timestamp" timestamp } }
+{ $description "Calculates the time of sunrise on the given day at the given location in the given timezone." } ;
+
+HELP: sunset
+{ $values
+    { "timestamp" timestamp }
+    { "latitude" real }
+    { "longitude" real }
+    { "new-timestamp" timestamp } }
+{ $description "Calculates the time of sunset on the given day at the given location in the given timezone." } ;
+
+HELP: solar-noon
+{ $values
+    { "timestamp" timestamp }
+    { "longitude" real }
+    { "new-timestamp" timestamp } }
+{ $description "Calculates solar noon of the given day at the given longitude in the given timezone." } ;
+
 ARTICLE: "calendar" "Calendar"
 "The " { $vocab-link "calendar" } " vocabulary defines two data types and a set of operations on them:"
 { $subsections
@@ -506,7 +529,8 @@ ARTICLE: "calendar" "Calendar"
 "Getting the current timestamp:"
 { $subsections
     now
-    gmt
+    now-gmt
+    now-utc
 }
 "Time zones:"
 { $subsections
@@ -525,6 +549,13 @@ ARTICLE: "calendar" "Calendar"
 }
 "Both " { $link timestamp } "s and " { $link duration } "s implement the " { $link "math.order" } "."
 $nl
+"Solar position calculations:"
+{ $subsections
+    sunrise
+    sunset
+    solar-noon
+}
+$nl
 "Metadata about the calendar:"
 { $subsections "calendar-facts" } ;