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

[REBOL] Re: How to...? Convert Date of Birth to Age

From: joel:neely:fedex at: 3-Jul-2002 14:04

Hi, Ladislav, Ladislav Mecir wrote:
> >> age 29/2/2004 28/2/2005 > == [0 11 28] > >> datedelta 29/2/2004 28/2/2005 > == [0 11 30] > > >> age 29/2/2004 1/3/2005 > == [1 0 1] > >> datedelta 29/2/2004 1/3/2005 > == [1 0 0] >
Good questions, to which I'll add another: If you were born on 29 Feb 2000, when did your next birthday occur? Given the irregularities in the current calendar scheme, I guess I'd have to wonder about the purpose of the calculation before forming opinions re date arithmetic including/surrounding leap days. -jn- -- ; Joel Neely joeldotneelyatfedexdotcom REBOL [] do [ do func [s] [ foreach [a b] s [prin b] ] sort/skip do function [s] [t] [ t: "" foreach [a b] s [repend t [b a]] t ] { | e s m!zauafBpcvekexEohthjJakwLrngohOqrlryRnsctdtiub} 2 ]