This is srfi-19.egg.info, produced by makeinfo version 4.7 from
eggdoc-output.texi.

INFO-DIR-SECTION The Algorithmic Language Scheme
START-INFO-DIR-ENTRY
* srfi-19.egg: (srfi-19.egg).		Provides SRFI-19.
END-INFO-DIR-ENTRY


File: srfi-19.egg.info,  Node: Top,  Next: About this egg,  Up: (dir)

srfi-19 egg
***********

Provides SRFI-19.

Written by Kon Lovett (mailto:klovett@pacbell.net)

   This manual corresponds to version 1.6 of the srfi-19 extension
library for Chicken Scheme.

* Menu:

* About this egg::
* Documentation::
* Issues::
* License::
* Index::


File: srfi-19.egg.info,  Node: About this egg,  Next: Documentation,  Prev: Top,  Up: Top

1 About this egg
****************

* Menu:

* Version history::
* Requirements::
* Usage::


File: srfi-19.egg.info,  Node: Version history,  Next: Requirements,  Up: About this egg

1.1 Version history
===================

`1.6'
     Bug fix for inexact seconds in time->date [thanks to Peter Bex]

`1.5'
     Bug fix for compiled use

`1.4'
     Exports

`1.3'
     Bug fix

`1.2'
     Slightly smaller and faster

`1.1'
     Some srfi-18 conflict reduction

`1.0'
     Initial release


File: srfi-19.egg.info,  Node: Requirements,  Next: Usage,  Prev: Version history,  Up: About this egg

1.2 Requirements
================

This egg requires the following extensions:

   `locale', `srfi-29', `vector-lib', `numbers'


File: srfi-19.egg.info,  Node: Usage,  Prev: Requirements,  Up: About this egg

1.3 Usage
=========

Load this egg like so:

   `(require-extension srfi-19)'


File: srfi-19.egg.info,  Node: Documentation,  Next: Issues,  Prev: About this egg,  Up: Top

2 Documentation
***************

srfi-19 is a CHICKEN port of SRFI-19.

   This package largely follows the specification of SRFI-19. For more
information see the documentation for SRFI-19
(http://srfi.schemers.org/srfi-19/srfi-19.html).

* Menu:

* Extensions to SRFI-19::


File: srfi-19.egg.info,  Node: Extensions to SRFI-19,  Up: Documentation

2.1 Extensions to SRFI-19
=========================

* Menu:

* Notes::
* Procedures::


File: srfi-19.egg.info,  Node: Notes,  Next: Procedures,  Up: Extensions to SRFI-19

2.1.1 Notes
-----------

The `nanosecond' time object element is an integer 					between 0 and
999,999,999 inclusive. (Not an extension, the 					srfi document is
just wrong.)

   The procedure `srfi-19:current-time' is a synonym 					for the
`current-time' procedure.

   The procedure `srfi-19:time?' is a synonym 					for the `time?'
procedure.

   The `string->date' procedure allows the 					template-name
argument to be optional. When missing the locale's 					date-time-format
string is used. The supplied locale bundle's 					strings are
invertible.

   The `make-date' procedure allows an optional 					timezone abbreviation
name as the last argument.

   Where the srfi document states a `tz-offset' 					argument a
timezone-locale structure is allowed, in addition to 					an offset value. A
timezone-locale structure is a pair where the 					car is a boolean
stating whether daylight saving time (summer 					time) is in
effect, and the cdr is a timezone-components 					object.

   Be careful using the procedures that return some form of
'julian-day.' These are implemented using the full numeric
tower and _will_ return rational numbers. Performing 					arithmetic with
such a result will require the "numbers" 					egg. See the file
"srfi-19-test.scm" in this egg for an 					example.


File: srfi-19.egg.info,  Node: Procedures,  Prev: Notes,  Up: Extensions to SRFI-19

2.1.2 Procedures
----------------

 -- procedure: read-leap-second-table
          (read-leap-second-table [FILENAME])

     Sets the leap second table from the specified `FILENAME'. When
     missing the `(repository-path) 						"tai-utc.dat"' filename is used.
     (Missing from the srfi 						document.)

 -- procedure: leap-year?
          (leap-year? DATE)

     Is the specified `DATE' year a leap year? (Not an 						extension, just
     missing from the srfi document.)

 -- procedure: time->srfi-18-time
          (time->srfi-18-time TIME)

     Converts a srfi-19 time object to a srfi-18 time object.
     The conversion is really only meaningful for time-duration, 						but
     any time-type is accepted.

 -- procedure: srfi-18-time->time
          (srfi-18-time->time TIME)

     Converts a srfi-18 time object into a srfi-19 						time-duration object.

 -- procedure: seconds->time/type
          (seconds->time/type SECONDS [TIME-TYPE])

     Converts a `SECONDS' value, may be fractional, 						into a `TIME-TYPE'
     time object. The default time-type 						is `time-duration'.

 -- procedure: seconds->date/type
          (seconds->date/type SECONDS [DATE-TYPE])

     Converts a `SECONDS' value, may be fractional, 						into a date object.
     The `DATE-TYPE' is #t for the 						local timezone or #f for the utc
     timezone. The default 						date-type is #f.

 -- procedure: format-date
          (format-date DESTINATION DATE-FORMAT-STRING [DATE])

     Displays a text form of the `DATE' on the `DESTINATION' using the
     `DATE-FORMAT-STRING'. When 						the destination is #t the
     current-output-port is used, and the 						date object must be
     specified. When the destination is a 						string the
     date-format-string value must be a date object, the
     destination value is used as the date-format-string, and the
     result is returned as a string. When the destination is a port 						it
     must be an output-port, and the date object must be
     specified. When the destination is a number the 						current-error-port
     is the destination, and the date object 						must be specified.
     When the destination is #f the result is 						returned as a
     string, and the date object must be specified.

 -- procedure: scan-date
          (scan-date SOURCE TEMPLATE-STRING)

     Reads a text form of a date from the `SOURCE', 						following the
     `TEMPLATE-STRING', and returns a date 						object. When the
     source is #t the current-input-port is used.  						When the source is a
     port it must be an input-port. When the 						source is string
     it should be a date text form.

 -- procedure: copy-date
          (copy-date DATE)

     Returns an exact copy of the specified `DATE' 						object.

 -- procedure: date-zone-name
          (date-zone-name DATE)

     Returns the timezone abbreviation of the specified `DATE' object.
     The result is either a string or #f.

 -- procedure: time->nanoseconds
          (time->nanoseconds TIME)

     Returns the `TIME' object value as a 						nanoseconds value.

 -- procedure: nanoseconds->time
          (nanoseconds->time NANOSECONDS [TIME-TYPE])

     Returns the `NANOSECONDS' value as a time `TIME-TYPE' object. The
     default time-type is 						`time-duration'.

 -- procedure: nanoseconds->seconds
          (nanoseconds->seconds NANOSECONDS)

     Returns the `NANOSECONDS' value as an inexact 						seconds value.

 -- procedure: milliseconds->time
          (milliseconds->time MILLISECONDS [TIME-TYPE])

     Returns the `MILLISECONDS' value as a time `TIME-TYPE' object. The
     default time-type is `time-duration'.

 -- procedure: time->date
          (time->date TIME)

     Returns the `TIME' object value as a date. A 						shorthand for the
     `(time-*->date ...)' 						procedures.


File: srfi-19.egg.info,  Node: Issues,  Next: License,  Prev: Documentation,  Up: Top

3 Issues
********

The SRFI-18 `current-time' and `time?' 				procedures conflict with this
srfi's procedures.

   The SRFI-18 time object is not accepted except by the
conversion procedures.

   On a non-GNU `(build-platform)' there is no default 				local timezone
abbreviation. I hope to rectify this in the 				future.

   The expression `(time=? (seconds->time/type
(nanoseconds->seconds (time->nanoseconds a-time-duration)))
a-time-duration)' might be #f, due to the use of inexact
arithmetic.

   While it is possible to coerce 'julian-day' results to an
inexact number the "numbers" egg bindings will be active/loaded 				anyway.
This can be a problem with a file compiled using 				'generic-arithmetic'.
I suggest an intermediate file that wraps 				any 'julian-day'
calls and coerces to an inexact number. Use the 				wrapped 'julian-day'
call in your 'generic-arithmetic' source.


File: srfi-19.egg.info,  Node: License,  Next: Index,  Prev: Issues,  Up: Top

4 License
*********


Copyright (c) 2005, Kon Lovett.  All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the Software),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.


File: srfi-19.egg.info,  Node: Index,  Prev: License,  Up: Top

Index
*****

 [index ]
* Menu:

* copy-date:                             Procedures.          (line  70)
* date-zone-name:                        Procedures.          (line  75)
* format-date:                           Procedures.          (line  45)
* leap-year?:                            Procedures.          (line  14)
* milliseconds->time:                    Procedures.          (line  97)
* nanoseconds->seconds:                  Procedures.          (line  92)
* nanoseconds->time:                     Procedures.          (line  86)
* read-leap-second-table:                Procedures.          (line   7)
* scan-date:                             Procedures.          (line  61)
* seconds->date/type:                    Procedures.          (line  38)
* seconds->time/type:                    Procedures.          (line  32)
* srfi-18-time->time:                    Procedures.          (line  27)
* time->date:                            Procedures.          (line 103)
* time->nanoseconds:                     Procedures.          (line  81)
* time->srfi-18-time:                    Procedures.          (line  20)



Tag Table:
Node: Top224
Node: About this egg569
Node: Version history754
Node: Requirements1152
Node: Usage1387
Node: Documentation1548
Node: Extensions to SRFI-191919
Node: Notes2083
Node: Procedures3472
Node: Issues7396
Node: License8377
Node: Index9554

End Tag Table
