<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 13.11.2013 14:02, waldo kitty wrote:<br>
</div>
<blockquote cite="mid:52837849.2070300@windstream.net" type="cite"><br>
<blockquote type="cite">We don't need to invent the wheel again,
because others have solutions for that!
<br>
</blockquote>
<br>
then why does this thread exist? O:)
<br>
</blockquote>
<br>
I'll try to find what the usual way is to handle these problems: c++
Libraries for example?!<br>
<br>
<br>
<blockquote cite="mid:52837849.2070300@windstream.net" type="cite">
<br>
<br>
i don't know as i do not have that book... but since you have the
three routines available, can you please post what they return for
the two cases above??
<br>
</blockquote>
<br>
I don't have my test app anymore, changed it a lot last days to
follow the discussion, but perhaps you have a look at my post from
12.11.2013, 21:56<br>
<br>
<blockquote cite="mid:52837849.2070300@windstream.net" type="cite">
<br>
[...]
<br>
<blockquote type="cite">Bart delivered code that calculates
29.02.2000 to 28.02.2001 = 1 Year.
<br>
And that looks reasonable to me!
<br>
</blockquote>
<br>
but it is not, not really... 29.02 only comes around once every
four years... 29.02.leapyear to 28.02.leapyear+1 is one day short
of a year... if you were born on 29.02.1960, have you celebrated
your birthday 13 or 53 times? :)
<br>
</blockquote>
<br>
That depends on the country , you're living, see
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a href="http://en.wikipedia.org/wiki/February_29#Births">http://en.wikipedia.org/wiki/February_29#Births</a><br>
<br>
<blockquote cite="mid:52837849.2070300@windstream.net" type="cite">
<br>
<blockquote type="cite">Bart wrote:
<br>
<blockquote type="cite">I would actually say that in this
particular case the diff is 1 Year...
<br>
(11 M + (28 days in feb in a non-leapyear = 1M) = 12M = 1 Y.
<br>
</blockquote>
Soon we'll have working DateDiff function and my question will
be answered in
<br>
the end!
<br>
Thanks guys!!
<br>
</blockquote>
<br>
i can, however, agree with the reasoning bart has given above...
do you agree with it? is that what you want to see?
<br>
</blockquote>
<br>
I'm not the one to decide, but i need a function which provides
widely accepted results!<br>
I'll google again. <br>
<br>
<blockquote cite="mid:52837849.2070300@windstream.net" type="cite">
<br>
which of the following is what you want to see??
<br>
<br>
2000-02-29 to 2001-02-28 is 0 yrs 11 mos 27 days
(original)
<br>
<br>
2000-02-29 to 2001-02-28 is 0 yrs 11 mos 28 days (bart's
fix)
<br>
<br>
2000-02-29 to 2001-02-28 is 1 yrs 0 mos 0 days (actually
desired?)
<br>
<br>
<br>
<br>
</blockquote>
<br>
</body>
</html>