]> gitweb.factorcode.org Git - factor.git/commitdiff
time: rename set-time to set-system-time. Add calendar words.
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 5 Nov 2020 03:46:56 +0000 (21:46 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 5 Nov 2020 03:46:56 +0000 (21:46 -0600)
basis/calendar/calendar.factor
extra/time/time.factor
extra/time/unix/unix.factor
extra/time/windows/windows.factor
extra/tools/cal/cal.factor

index a9d6ff29799aa47b715994a99d06f6765246ba5d..ce5b7e6ee35e8e2181e4b139201f7fa21226c0fb 100644 (file)
@@ -154,6 +154,11 @@ M: timestamp easter
 : bienniums ( x -- duration ) instant swap 2 * >>year ;
 : trienniums ( x -- duration ) instant swap 3 * >>year ;
 : quadrenniums ( x -- duration ) instant swap 4 * >>year ;
+: quinquenniums ( x -- duration ) instant swap 5 * >>year ;
+: sexenniums ( x -- duration ) instant swap 6 * >>year ;
+: septenniums ( x -- duration ) instant swap 7 * >>year ;
+: octenniums ( x -- duration ) instant swap 8 * >>year ;
+: novenniums ( x -- duration ) instant swap 9 * >>year ;
 : lustrums ( x -- duration ) instant swap 5 * >>year ;
 : decades ( x -- duration ) instant swap 10 * >>year ;
 : indictions ( x -- duration ) instant swap 15 * >>year ;
index fb837d399891b12aaed55fc1add6fbd435d14106..15750a2dcd8c8d9e246144cb9e34c4b93cf1656f 100644 (file)
@@ -3,7 +3,7 @@
 USING: combinators kernel system vocabs ;
 IN: time
 
-HOOK: set-time os ( timestamp -- )
+HOOK: set-system-time os ( timestamp -- )
 HOOK: adjust-time-monotonic os ( timestamp -- seconds )
 
 {
index 62010336635c3822c2a6188d426cc6a2c9c60796..19129b360bd75f1a4007c6bb5d26f05fe23b1d7f 100644 (file)
@@ -7,7 +7,7 @@ IN: time.unix
 : timestamp>timezone ( timestamp -- timezone )
     gmt-offset>> duration>minutes 1 \ timezone <struct-boa> ; inline
 
-M: unix set-time
+M: unix set-system-time
     [ unix-1970 time- duration>microseconds >integer make-timeval ]
     [ timestamp>timezone ] bi
     settimeofday io-error ;
index 95fc9706e1c741cf4de5001e03145b6e1fe87ac9..efebecbd97874b9ad396ce67df15a5db64070562 100644 (file)
@@ -4,6 +4,6 @@ USING: calendar.windows system time windows.errors
 windows.kernel32 kernel classes.struct calendar ;
 IN: time.windows
 
-M: windows set-time
+M: windows set-system-time
     >gmt
     timestamp>SYSTEMTIME SetSystemTime win32-error=0/f ;
index 72619e16362a5656047514a7174e823c2b4cb65d..5554aa866a0a8823c077e2c8e690c94f431b0533 100644 (file)
@@ -2,14 +2,13 @@
 ! See http://factorcode.org/license.txt for BSD license
 USING: accessors calendar calendar.english combinators
 command-line formatting grouping io kernel math.parser
-math.ranges namespaces sequences sequences.extras strings.tables
-;
+math.ranges namespaces sequences sequences.extras strings.tables ;
 IN: tools.cal
 
 <PRIVATE
 
 : days ( timestamp -- days )
-    beginning-of-month
+    start-of-month
     [ day-of-week "  " <repetition> ]
     [ days-in-month [1,b] [ "%2d" sprintf ] map ] bi append
     42 "  " pad-tail ;