guile-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile/guile-core/doc/ref srfi-modules.texi


From: Thien-Thi Nguyen
Subject: guile/guile-core/doc/ref srfi-modules.texi
Date: Tue, 06 Nov 2001 17:35:53 -0500

CVSROOT:        /cvs
Module name:    guile
Changes by:     Thien-Thi Nguyen <address@hidden>       01/11/06 17:35:53

Modified files:
        guile-core/doc/ref: srfi-modules.texi 

Log message:
        (SRFI-19, SRFI-19 Constants, SRFI-19 Current time and clock
        resolution, SRFI-19 Time object and accessors, SRFI-19 Time
        comparison procedures, SRFI-19 Time arithmetic procedures,
        SRFI-19 Date object and accessors, SRFI-19 Time/Date/Julian
        Day/Modified Julian Day converters, SRFI-19 Date to
        string/string to date converters): New nodes.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/doc/ref/srfi-modules.texi.diff?cvsroot=OldCVS&tr1=1.2&tr2=1.3&r1=text&r2=text

Patches:
Index: guile/guile-core/doc/ref/srfi-modules.texi
diff -u guile/guile-core/doc/ref/srfi-modules.texi:1.2 
guile/guile-core/doc/ref/srfi-modules.texi:1.3
--- guile/guile-core/doc/ref/srfi-modules.texi:1.2      Wed Sep 26 13:24:54 2001
+++ guile/guile-core/doc/ref/srfi-modules.texi  Tue Nov  6 17:35:53 2001
@@ -39,7 +39,7 @@
 library, and partly as add-on modules.  That means that some SRFIs are
 automatically available when the interpreter is started, whereas the
 other SRFIs require you to use the appropriate support module
-explicitly.  
+explicitly.
 
 There are several reasons for this inconsistency.  First, the feature
 checking syntactic form @code{cond-expand} (@pxref{SRFI-0}) must be
@@ -128,7 +128,7 @@
 Currently, the feature identifiers @code{guile}, @code{r5rs} and
 @code{srfi-0} are supported.  The other SRFIs are not in that list by
 default, because the SRFI modules must be explicitly used before their
-exported bindings can be used.  
+exported bindings can be used.
 
 So if a Scheme program wishes to use SRFI-8, it has two possibilities:
 First, it can check whether the running Scheme implementation is Guile,
@@ -507,16 +507,16 @@
 
 @deffn procedure append-map f lst1 lst2 @dots{}
 @deffnx procedure append-map! f lst1 lst2 @dots{}
-Equivalent to 
+Equivalent to
 
 @lisp
-(apply append (map f clist1 clist2 ...)) 
+(apply append (map f clist1 clist2 ...))
 @end lisp
 
-and 
+and
 
 @lisp
-(apply append! (map f clist1 clist2 ...)) 
+(apply append! (map f clist1 clist2 ...))
 @end lisp
 
 Map @var{f} over the elements of the lists, just as in the @code{map}
@@ -848,7 +848,7 @@
 (and-let* ((x 1) (y #f)) 42)
 @result{}
 #f
-(and-let* ((x 1) (y #t)) x) 
+(and-let* ((x 1) (y #t)) x)
 @result{}
 1
 @end lisp
@@ -1026,7 +1026,7 @@
 
 @example
 guile> (use-modules (srfi srfi-9))
-guile> (define-record-type :foo (make-foo x) foo? 
+guile> (define-record-type :foo (make-foo x) foo?
                            (x get-x) (y get-y set-y!))
 guile> (define f (make-foo 1))
 guile> f
@@ -1189,7 +1189,7 @@
 @end example
 
 @node SRFI-13 Predicates
address@hidden Predicates 
address@hidden Predicates
 
 In addition to the primitives @code{string?} and @code{string-null?},
 which are already in the Guile core, the string predicates
@@ -1471,7 +1471,7 @@
 equals @var{char_pred}, if it is character,
 
 @item
-satisifies the predicate @var{char_pred}, if it is a 
+satisifies the predicate @var{char_pred}, if it is a
 procedure,
 
 @item
@@ -1649,7 +1649,7 @@
 @dots{}
 @item @var{p} tells us when to stop - when it returns true
 when applied to one of these seed values.
address@hidden @var{f} maps each seed value to the corresponding 
address@hidden @var{f} maps each seed value to the corresponding
 character in the result string.  These chars are assembled into the
 string in a left-to-right (right-to-left) order.
 @item @var{base} is the optional initial/leftmost (rightmost)
@@ -1888,11 +1888,11 @@
 @deffnx primitive char-set-unfold! p f g seed base_cs
 This is a fundamental constructor for character sets.
 @itemize @bullet
address@hidden @var{g} is used to generate a series of ``seed'' values 
address@hidden @var{g} is used to generate a series of ``seed'' values
 from the initial seed: @var{seed}, (@var{g} @var{seed}),
 (@var{g}^2 @var{seed}), (@var{g}^3 @var{seed}), @dots{}
 @item @var{p} tells us when to stop -- when it returns true
-when applied to one of the seed values. 
+when applied to one of the seed values.
 @item @var{f} maps each seed value to a character. These
 characters are added to the base character set @var{base_cs} to
 form the result; @var{base_cs} defaults to the empty set.
@@ -2239,3 +2239,160 @@
 the @code{getter-with-setter} procedure. This procedure is also
 specified in the SRFI.  Using it avoids the described problems.
 
+
address@hidden SRFI-19
address@hidden SRFI-19 - Time/Date Library
+
+This is an implementation of SRFI-19: Time/Date Library
+
+It depends on SRFIs: 6 (@pxref{SRFI-6}), 8 (@pxref{SRFI-8}),
+9 (@pxref{SRFI-9}).
+
+This section documents constants and procedure signatures.
+
address@hidden
+* SRFI-19 Constants::
+* SRFI-19 Current time and clock resolution::
+* SRFI-19 Time object and accessors::
+* SRFI-19 Time comparison procedures::
+* SRFI-19 Time arithmetic procedures::
+* SRFI-19 Date object and accessors::
+* SRFI-19 Time/Date/Julian Day/Modified Julian Day converters::
+* SRFI-19 Date to string/string to date converters::
address@hidden menu
+
address@hidden SRFI-19 Constants
address@hidden SRFI-19 Constants
+
+All these are bound to their symbol names:
+
address@hidden
+           time-duration
+           time-monotonic
+           time-process
+           time-tai
+           time-thread
+           time-utc
address@hidden example
+
address@hidden SRFI-19 Current time and clock resolution
address@hidden SRFI-19 Current time and clock resolution
+
address@hidden
+           (current-date . tz-offset)
+           (current-julian-day)
+           (current-modified-julian-day)
+           (current-time . clock-type)
+           (time-resolution . clock-type)
address@hidden example
+
address@hidden SRFI-19 Time object and accessors
address@hidden SRFI-19 Time object and accessors
+
address@hidden
+           (make-time type nanosecond second)
+           (time? obj)
+           (time-type time)
+           (time-nanosecond time)
+           (time-second time)
+           (set-time-type! time type)
+           (set-time-nanosecond! time nsec)
+           (set-time-second! time sec)
+           (copy-time time)
address@hidden example
+
address@hidden SRFI-19 Time comparison procedures
address@hidden SRFI-19 Time comparison procedures
+
+Args are all @code{time} values.
+
address@hidden
+           (time<=? t1 t2)
+           (time<? t1 t2)
+           (time=? t1 t2)
+           (time>=? t1 t2)
+           (time>? t1 t2)
address@hidden example
+
address@hidden SRFI-19 Time arithmetic procedures
address@hidden SRFI-19 Time arithmetic procedures
+
+The @code{foo!} variants modify in place.  Time difference
+is expressed in @code{time-duration} values.
+
address@hidden
+           (time-difference t1 t2)
+           (time-difference! t1 t2)
+           (add-duration time duration)
+           (add-duration! time duration)
+           (subtract-duration time duration)
+           (subtract-duration! time duration)
+ @end example
+
address@hidden SRFI-19 Date object and accessors
address@hidden SRFI-19 Date object and accessors
+
address@hidden
+           (make-date nsecs seconds minutes hours
+                      date month year offset)
+           (date? obj)
+           (date-nanosecond date)
+           (date-second date)
+           (date-minute date)
+           (date-hour date)
+           (date-day date)
+           (date-month date)
+           (date-year date)
+           (date-zone-offset date)
+           (date-year-day date)
+           (date-week-day date)
+           (date-week-number date day-of-week-starting-week)
address@hidden example
+
address@hidden SRFI-19 Time/Date/Julian Day/Modified Julian Day converters
address@hidden SRFI-19 Time/Date/Julian Day/Modified Julian Day converters
+
address@hidden
+           (date->julian-day date)
+           (date->modified-julian-day date)
+           (date->time-monotonic date)
+           (date->time-tai date)
+           (date->time-utc date)
+           (julian-day->date jdn . tz-offset)
+           (julian-day->time-monotonic jdn)
+           (julian-day->time-tai jdn)
+           (julian-day->time-utc jdn)
+           (modified-julian-day->date jdn . tz-offset)
+           (modified-julian-day->time-monotonic jdn)
+           (modified-julian-day->time-tai jdn)
+           (modified-julian-day->time-utc jdn)
+           (time-monotonic->date time . tz-offset)
+           (time-monotonic->time-tai time-in)
+           (time-monotonic->time-tai! time-in)
+           (time-monotonic->time-utc time-in)
+           (time-monotonic->time-utc! time-in)
+           (time-tai->date time . tz-offset)
+           (time-tai->julian-day time)
+           (time-tai->modified-julian-day time)
+           (time-tai->time-monotonic time-in)
+           (time-tai->time-monotonic! time-in)
+           (time-tai->time-utc time-in)
+           (time-tai->time-utc! time-in)
+           (time-utc->date time . tz-offset)
+           (time-utc->julian-day time)
+           (time-utc->modified-julian-day time)
+           (time-utc->time-monotonic time-in)
+           (time-utc->time-monotonic! time-in)
+           (time-utc->time-tai time-in)
+           (time-utc->time-tai! time-in)
address@hidden example
+
address@hidden SRFI-19 Date to string/string to date converters
address@hidden SRFI-19 Date to string/string to date converters
+
address@hidden
+           (date->string date . format-string)
+           (string->date input-string template-string)
address@hidden example
+
address@hidden srfi-modules.texi ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]