Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: ANN: subtract-dates

From: brett:codeconscious at: 8-Jun-2003 12:05

Hi rebOldes, This is my version, but as Volker has shown it is made redundant by Difference in the latest REBOLs except the latest non-experimental, non-beta View (1.2.1): subtract-datetimes: function [ "Subract one date from another returning time between them." a [date!] b [date!] ] [delta-days delta-hhmmss a-hhmmss b-hhmmss] [ delta-days: subtract a/date b/date a-hhmmss: either a/time [a/time] [00:00:00] b-hhmmss: either b/time [b/time] [00:00:00] return add (multiply 24:00:00 delta-days) (subtract a-hhmmss b-hhmmss) ] Regards, Brett