From aa56a3a0d4128b0262e3b2887c07f38bdd153a2c Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 22 Mar 2000 17:37:02 +0000 Subject: [PATCH] Add procedures to convert between ISO C ctime() strings and other time formats. Additionally, export procedures that convert strings to day-of-week, month, and time-zone. --- v7/src/runtime/datime.scm | 6 +++--- v7/src/runtime/runtime.pkg | 13 +++++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/v7/src/runtime/datime.scm b/v7/src/runtime/datime.scm index c1cef7161..31a423893 100644 --- a/v7/src/runtime/datime.scm +++ b/v7/src/runtime/datime.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: datime.scm,v 14.23 2000/03/22 17:34:49 cph Exp $ +$Id: datime.scm,v 14.24 2000/03/22 17:37:02 cph Exp $ Copyright (c) 1988-2000 Massachusetts Institute of Technology @@ -349,13 +349,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define (universal-time->ctime-string time) (decoded-time->ctime-string (universal-time->local-decoded-time time))) -(define (ctime-string->universal-time time) +(define (ctime-string->universal-time string) (decoded-time->universal-time (ctime-string->decoded-time string))) (define (file-time->ctime-string time) (decoded-time->ctime-string (file-time->local-decoded-time time))) -(define (ctime-string->file-time time) +(define (ctime-string->file-time string) (decoded-time->file-time (ctime-string->decoded-time string))) (define (month/max-days month) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index d44696be9..fe56ae250 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.336 2000/01/04 17:24:06 cph Exp $ +$Id: runtime.pkg,v 14.337 2000/03/22 17:35:25 cph Exp $ -Copyright (c) 1988-1999 Massachusetts Institute of Technology +Copyright (c) 1988-2000 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -486,9 +486,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (files "datime") (parent ()) (export () + ctime-string->decoded-time + ctime-string->file-time + ctime-string->universal-time day-of-week/long-string day-of-week/short-string decode-universal-time + decoded-time->ctime-string decoded-time->string decoded-time->universal-time decoded-time/date-string @@ -504,6 +508,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. decoded-time/zone encode-universal-time epoch + file-time->ctime-string file-time->global-time-string file-time->local-time-string file-time->string @@ -515,11 +520,15 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. month/long-string month/max-days month/short-string + string->day-of-week string->decoded-time string->file-time + string->month + string->time-zone string->universal-time time-zone->string time-zone? + universal-time->ctime-string universal-time->global-decoded-time universal-time->global-time-string universal-time->local-decoded-time -- 2.25.1