[dev] adding a group
Jon Parise
jon@horde.org
Thu, 6 Dec 2001 15:42:17 -0500
On Thu, Dec 06, 2001 at 07:27:50PM -0500, Paul Cooper wrote:
> can we add DEFAULT NOW() to category_updated in scripts/db/category.sql -
> otherwise the sql in the addCategory method doesn't work (because category
> updated is null).
Done.
I haven't had the time to review your other submissions. I'm
going to be swamped for the next week, so hopefully one of the
other guys will get some time to look things over.
--
Jon Parise (jon@csh.rit.edu) . Information Technology (2001)
http://www.csh.rit.edu/~jon/ : Computer Science House Member
>From chuck@horde.org Date: Thu, 6 Dec 2001 15:44:33 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 19884 invoked from network); 6 Dec 2001 20:45:12 -0000
Received: from h00104bc60b3c.ne.mediaone.net (HELO marina.horde.org) (24.91.196.127)
by clark.horde.org with SMTP; 6 Dec 2001 20:45:11 -0000
Received: by marina.horde.org (Postfix, from userid 33)
id 98DD03972; Thu, 6 Dec 2001 15:44:33 -0500 (EST)
Received: from 192.168.0.102 ( [192.168.0.102])
as user chuck@localhost by marina.horde.org with HTTP;
Thu, 6 Dec 2001 15:44:33 -0500
Message-ID: <1007671473.3c0fd8b16f7e6@marina.horde.org>
Date: Thu, 6 Dec 2001 15:44:33 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: dev@lists.horde.org
References: <20011206192749.A30133@ucecom.com> <20011206154216.A2031@csh.rit.edu>
In-Reply-To: <20011206154216.A2031@csh.rit.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: [dev] adding a group
Quoting Jon Parise <jon@horde.org>:
> I haven't had the time to review your other submissions. I'm
> going to be swamped for the next week, so hopefully one of the
> other guys will get some time to look things over.
I'll get to it. I got a new digital camera today, so I've been playing, but all
this is stuff I've been working on actively, so I'm happy to handle it.
Now I just need to dig out from under today/yesterday's email...
-chuck
--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in the
arms of silence. All we ever have is here, now." - Ursula K. Le Guin
>From chuck@horde.org Date: Thu, 6 Dec 2001 16:14:12 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 23412 invoked from network); 6 Dec 2001 21:14:52 -0000
Received: from h00104bc60b3c.ne.mediaone.net (HELO marina.horde.org) (24.91.196.127)
by clark.horde.org with SMTP; 6 Dec 2001 21:14:52 -0000
Received: by marina.horde.org (Postfix, from userid 33)
id C41C039B4; Thu, 6 Dec 2001 16:14:12 -0500 (EST)
Received: from 192.168.0.102 ( [192.168.0.102])
as user chuck@localhost by marina.horde.org with HTTP;
Thu, 6 Dec 2001 16:14:12 -0500
Message-ID: <1007673252.3c0fdfa48f972@marina.horde.org>
Date: Thu, 6 Dec 2001 16:14:12 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: dev@lists.horde.org
References: <1007651547.3c0f8adc031e9@linux.wg.de>
In-Reply-To: <1007651547.3c0f8adc031e9@linux.wg.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: [dev] Fwd: [imp] IMP HEAD CVS: error in newmail popup
Quoting Jan Schneider <jan@horde.org>:
> Does anybody know why we pass the url through htmlentities() if the $full
> flag is not set in Horde::url but not if it is set?
XHTML.
-chuck
--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in the
arms of silence. All we ever have is here, now." - Ursula K. Le Guin
>From chuck@horde.org Date: Thu, 6 Dec 2001 16:53:17 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 30093 invoked from network); 6 Dec 2001 21:53:55 -0000
Received: from h00104bc60b3c.ne.mediaone.net (HELO marina.horde.org) (24.91.196.127)
by clark.horde.org with SMTP; 6 Dec 2001 21:53:55 -0000
Received: by marina.horde.org (Postfix, from userid 33)
id 428D439B4; Thu, 6 Dec 2001 16:53:17 -0500 (EST)
Received: from 192.168.0.102 ( [192.168.0.102])
as user chuck@localhost by marina.horde.org with HTTP;
Thu, 6 Dec 2001 16:53:17 -0500
Message-ID: <1007675597.3c0fe8cd1d754@marina.horde.org>
Date: Thu, 6 Dec 2001 16:53:17 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: dev@lists.horde.org
References: <20011206185131.A29993@ucecom.com> <20011206185657.A30040@ucecom.com>
In-Reply-To: <20011206185657.A30040@ucecom.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: [dev] patch for Group.php
Quoting Paul Cooper <pgc@ucecom.com>:
> Doh, with more testing I found some more missing as's - see the new patch
> attached,
Committed, thanks!
-chuck
--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in the
arms of silence. All we ever have is here, now." - Ursula K. Le Guin
>From chuck@horde.org Date: Thu, 6 Dec 2001 16:56:28 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 30475 invoked from network); 6 Dec 2001 21:57:07 -0000
Received: from h00104bc60b3c.ne.mediaone.net (HELO marina.horde.org) (24.91.196.127)
by clark.horde.org with SMTP; 6 Dec 2001 21:57:07 -0000
Received: by marina.horde.org (Postfix, from userid 33)
id 8CA7039B4; Thu, 6 Dec 2001 16:56:28 -0500 (EST)
Received: from 192.168.0.102 ( [192.168.0.102])
as user chuck@localhost by marina.horde.org with HTTP;
Thu, 6 Dec 2001 16:56:28 -0500
Message-ID: <1007675788.3c0fe98c65f40@marina.horde.org>
Date: Thu, 6 Dec 2001 16:56:28 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: dev@lists.horde.org
References: <20011206192749.A30133@ucecom.com>
In-Reply-To: <20011206192749.A30133@ucecom.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: [dev] adding a group
Quoting Paul Cooper <pgc@ucecom.com>:
> Plus to be able to add a group I had to make a couple fo changes to
> Group.php and Category.php - diffs attached.
Committed, thanks. I've been meaning to get back to this for a while; hopefully
it'll happen sooner with your prodding/help. :)
-chuck
--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in the
arms of silence. All we ever have is here, now." - Ursula K. Le Guin
>From jan@horde.org Date: Thu, 6 Dec 2001 22:59:52 +0100
Return-Path: <jan@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 30979 invoked from network); 6 Dec 2001 22:07:51 -0000
Received: from mailout05.sul.t-online.com (HELO mailout05.sul.t-online.de) (194.25.134.82)
by clark.horde.org with SMTP; 6 Dec 2001 22:07:51 -0000
Received: from fwd06.sul.t-online.de
by mailout05.sul.t-online.de with smtp
id 16C6gI-0005KS-06; Thu, 06 Dec 2001 23:07:50 +0100
Received: from linux.wg.de (320034214675-0001@[217.225.46.190]) by fmrl06.sul.t-online.com
with esmtp id 16C6g5-0j1tYWC; Thu, 6 Dec 2001 23:07:37 +0100
Received: from localhost (localhost [127.0.0.1])
by linux.wg.de (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id fB6Lxrk05173
for <dev@lists.horde.org>; Thu, 6 Dec 2001 22:59:53 +0100
Received: from 192.168.60.1 ( [192.168.60.1])
as user jan@linux by linux.wg.de with HTTP;
Thu, 6 Dec 2001 22:59:52 +0100
Message-ID: <1007675992.3c0fea5862558@linux.wg.de>
Date: Thu, 6 Dec 2001 22:59:52 +0100
From: Jan Schneider <jan@horde.org>
To: dev@lists.horde.org
References: <1007651547.3c0f8adc031e9@linux.wg.de> <1007673252.3c0fdfa48f972@marina.horde.org>
In-Reply-To: <1007673252.3c0fdfa48f972@marina.horde.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Sender: 320034214675-0001@t-dialin.net
Subject: Re: [dev] Fwd: [imp] IMP HEAD CVS: error in newmail popup
Zitat von Chuck Hagenbuch <chuck@horde.org>:
> Quoting Jan Schneider <jan@horde.org>:
>
> > Does anybody know why we pass the url through htmlentities() if the
> $full
> > flag is not set in Horde::url but not if it is set?
>
> XHTML.
Ah, I see. If you provide a complete url with protocol and server name you
don't have to encode &. ;-)
Jan.
::::::::::::::::::::::::::::::::::::::::
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::
>From chuck@horde.org Date: Thu, 6 Dec 2001 17:18:47 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 34251 invoked from network); 7 Dec 2001 00:44:31 -0000
Received: from h00104bc60b3c.ne.mediaone.net (HELO marina.horde.org) (24.91.196.127)
by clark.horde.org with SMTP; 7 Dec 2001 00:44:31 -0000
Received: by marina.horde.org (Postfix, from userid 33)
id 449EE3972; Thu, 6 Dec 2001 17:18:47 -0500 (EST)
Received: from 192.168.0.102 ( [192.168.0.102])
as user chuck@localhost by marina.horde.org with HTTP;
Thu, 6 Dec 2001 17:18:47 -0500
Message-ID: <1007677127.3c0feec71ecf5@marina.horde.org>
Date: Thu, 6 Dec 2001 17:18:47 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: dev@lists.horde.org
References: <1007651547.3c0f8adc031e9@linux.wg.de> <1007673252.3c0fdfa48f972@marina.horde.org> <1007675992.3c0fea5862558@linux.wg.de>
In-Reply-To: <1007675992.3c0fea5862558@linux.wg.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: [dev] Fwd: [imp] IMP HEAD CVS: error in newmail popup
Quoting Jan Schneider <jan@horde.org>:
> Ah, I see. If you provide a complete url with protocol and server name you
> don't have to encode &. ;-)
Yeah, it's rather invalid in Location: headers, for instance.
-chuck
--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in the
arms of silence. All we ever have is here, now." - Ursula K. Le Guin
>From mike@graftonhall.co.nz Date: Fri, 7 Dec 2001 11:24:25 +0000
Return-Path: <mike@graftonhall.co.nz>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 48630 invoked from network); 7 Dec 2001 11:24:04 -0000
Received: from unknown (HELO graftonhall.co.nz) (210.54.179.59)
by clark.horde.org with SMTP; 7 Dec 2001 11:24:04 -0000
Received: from localhost [127.0.0.1]
by graftonhall.co.nz [10.0.0.4]
with SMTP (MDaemon.PRO.v5.0.1.R)
for <dev@lists.horde.org>; Sat, 08 Dec 2001 00:24:25 +1300
Received: from 10.0.0.4 ( [10.0.0.4])
as user mike@10.0.0.4 by webmail.graftonhall.co.nz with HTTP;
Fri, 7 Dec 2001 11:24:25 +0000
Message-ID: <1007724265.3c10a6e95acfc@webmail.graftonhall.co.nz>
Date: Fri, 7 Dec 2001 11:24:25 +0000
From: Michael Cochrane <mike@graftonhall.co.nz>
To: "dev@lists.horde.org" <dev@lists.horde.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Originating-IP: 10.0.0.4
X-MDRemoteIP: 127.0.0.1
X-Return-Path: mike@graftonhall.co.nz
X-MDaemon-Deliver-To: dev@lists.horde.org
Subject: Kronolith Windows Patch
In lib\Kronolith.php there is a small issue... not with the coding but more a
windows quirk....
In the function weekOfYear there exists the line:
return strftime('%V', mktime(0, 0, 0, $month, $day, $year));
all good on a Linux system but has a problem on windows... windows doesn't have
a %V.. it has a %W which gives the same value.
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/vccore98/html/_crt_strftime.2c_.wcsftime.asp says:
%W Week of year as decimal number, with Monday as first day of week (00 – 53)
PHP manual says:
%V - The ISO 8601:1988 week number of the current year as a decimal number,
range 01 to 53, where week 1 is the first week that has at least 4 days in the
current year, and with Monday as the first day of the week.
So I added:
if (OS_WINDOWS) return strftime('%W', mktime(0, 0, 0, $month, $day,
$year));
before the normal return in this function... can someone commit this?
Thanks
Mike
Patch:
Index: kronolith/lib/Kronolith.php
===================================================================
RCS file: /repository/kronolith/lib/Kronolith.php,v
retrieving revision 1.43
diff -r1.43 Kronolith.php
192c192,194
<
---
>
> if (OS_WINDOWS) return strftime('%W', mktime(0, 0, 0, $month, $day,
$year));
>
>From jan@horde.org Date: Fri, 7 Dec 2001 12:35:31 +0100
Return-Path: <jan@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 49443 invoked from network); 7 Dec 2001 11:38:05 -0000
Received: from mailout01.sul.t-online.com (HELO mailout01.sul.t-online.de) (194.25.134.80)
by clark.horde.org with SMTP; 7 Dec 2001 11:38:05 -0000
Received: from fwd01.sul.t-online.de
by mailout01.sul.t-online.de with smtp
id 16CJKK-0005WF-02; Fri, 07 Dec 2001 12:38:00 +0100
Received: from linux.wg.de (320034214675-0001@[217.225.43.97]) by fmrl01.sul.t-online.com
with esmtp id 16CJK3-0kvJRKC; Fri, 7 Dec 2001 12:37:43 +0100
Received: from localhost (localhost [127.0.0.1])
by linux.wg.de (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id fB7BZVk09216
for <dev@lists.horde.org>; Fri, 7 Dec 2001 12:35:31 +0100
Received: from 192.168.60.1 ( [192.168.60.1])
as user jan@linux by linux.wg.de with HTTP;
Fri, 7 Dec 2001 12:35:31 +0100
Message-ID: <1007724931.3c10a9830654a@linux.wg.de>
Date: Fri, 7 Dec 2001 12:35:31 +0100
From: Jan Schneider <jan@horde.org>
To: dev@lists.horde.org
References: <1007724265.3c10a6e95acfc@webmail.graftonhall.co.nz>
In-Reply-To: <1007724265.3c10a6e95acfc@webmail.graftonhall.co.nz>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Sender: 320034214675-0001@t-dialin.net
Subject: Re: [dev] Kronolith Windows Patch
Zitat von Michael Cochrane <mike@graftonhall.co.nz>:
>
> In lib\Kronolith.php there is a small issue... not with the coding but
> more a
> windows quirk....
> In the function weekOfYear there exists the line:
> return strftime('%V', mktime(0, 0, 0, $month, $day, $year));
> all good on a Linux system but has a problem on windows... windows
> doesn't have
> a %V.. it has a %W which gives the same value.
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-
> us/vccore98/html/_crt_strftime.2c_.wcsftime.asp says:
> %W Week of year as decimal number, with Monday as first day of week (00 –
> 53)
>
> PHP manual says:
> %V - The ISO 8601:1988 week number of the current year as a decimal
> number,
> range 01 to 53, where week 1 is the first week that has at least 4 days
> in the
> current year, and with Monday as the first day of the week.
>
> So I added:
> if (OS_WINDOWS) return strftime('%W', mktime(0, 0, 0, $month,
> $day,
> $year));
>
> before the normal return in this function... can someone commit this?
>
> Thanks
>
> Mike
>
> Patch:
> Index: kronolith/lib/Kronolith.php
> ===================================================================
> RCS file: /repository/kronolith/lib/Kronolith.php,v
> retrieving revision 1.43
> diff -r1.43 Kronolith.php
> 192c192,194
> <
> ---
> >
> > if (OS_WINDOWS) return strftime('%W', mktime(0, 0, 0, $month,
> $day,
> $year));
> >
Are there any more comments on the msdn site if the weeknumber calculation
is iso 8601 conform? If not we should rather use our own weeknumber
function we used to have in Kronolith.php instead breaking compatability
between Windows and *nix installations.
Jan.
::::::::::::::::::::::::::::::::::::::::
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::
>From mike@graftonhall.co.nz Date: Fri, 7 Dec 2001 12:06:06 +0000
Return-Path: <mike@graftonhall.co.nz>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 50624 invoked from network); 7 Dec 2001 12:05:14 -0000
Received: from unknown (HELO graftonhall.co.nz) (210.54.179.59)
by clark.horde.org with SMTP; 7 Dec 2001 12:05:14 -0000
Received: from localhost [127.0.0.1]
by graftonhall.co.nz [10.0.0.4]
with SMTP (MDaemon.PRO.v5.0.1.R)
for <dev@lists.horde.org>; Sat, 08 Dec 2001 01:06:07 +1300
Received: from 10.0.0.4 ( [10.0.0.4])
as user mike@10.0.0.4 by webmail.graftonhall.co.nz with HTTP;
Fri, 7 Dec 2001 12:06:06 +0000
Message-ID: <1007726766.3c10b0ae88bc1@webmail.graftonhall.co.nz>
Date: Fri, 7 Dec 2001 12:06:06 +0000
From: Michael Cochrane <mike@graftonhall.co.nz>
To: dev@lists.horde.org
References: <1007724265.3c10a6e95acfc@webmail.graftonhall.co.nz> <1007724931.3c10a9830654a@linux.wg.de>
In-Reply-To: <1007724931.3c10a9830654a@linux.wg.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Originating-IP: 10.0.0.4
X-MDRemoteIP: 127.0.0.1
X-Return-Path: mike@graftonhall.co.nz
X-MDaemon-Deliver-To: dev@lists.horde.org
Subject: Re: [dev] Kronolith Windows Patch
No there's not and i'm having trouble trying to extablish if it does conform or
not. it works as far as i can see but can someone pls run this code and post
the results so i have something to compare to
echo "1st Jan\n";
for ($year = 1990; $year <= 2010; $year++) {
echo "$year " . strftime("%V\n", mktime(0, 0, 0, 1,1 , $year));
}
echo "\n31st Dec\n";
for ($year = 1990; $year <= 2010; $year++) {
echo "$year " . strftime("%V\n", mktime(0, 0, 0, 12,31 , $year));
}
- Mike
Quoting Jan Schneider <jan@horde.org>:
> Are there any more comments on the msdn site if the weeknumber calculation
> is iso 8601 conform? If not we should rather use our own weeknumber
> function we used to have in Kronolith.php instead breaking compatability
> between Windows and *nix installations.
>
> Jan.
>
> ::::::::::::::::::::::::::::::::::::::::
> AMMMa AG - discover your knowledge
> :::::::::::::::::::::::::::
> Detmolder Str. 25-33 :: D-33604 Bielefeld
> fon +49.521.96878-0 :: fax +49.521.96878-20
> http://www.ammma.de
> ::::::::::::::::::::::::::::::::::::::::::::::
>
> --
> Horde Developers mailing list: http://horde.org/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe@lists.horde.org
>
>
>From mike@graftonhall.co.nz Date: Fri, 7 Dec 2001 14:09:19 +0000
Return-Path: <mike@graftonhall.co.nz>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 52572 invoked from network); 7 Dec 2001 14:08:46 -0000
Received: from unknown (HELO graftonhall.co.nz) (210.54.179.59)
by clark.horde.org with SMTP; 7 Dec 2001 14:08:46 -0000
Received: from localhost [127.0.0.1]
by graftonhall.co.nz [10.0.0.4]
with SMTP (MDaemon.PRO.v5.0.1.R)
for <dev@lists.horde.org>; Sat, 08 Dec 2001 03:09:20 +1300
Received: from 10.0.0.4 ( [10.0.0.4])
as user mike@10.0.0.4 by webmail.graftonhall.co.nz with HTTP;
Fri, 7 Dec 2001 14:09:19 +0000
Message-ID: <1007734159.3c10cd8fd6ca4@webmail.graftonhall.co.nz>
Date: Fri, 7 Dec 2001 14:09:19 +0000
From: Michael Cochrane <mike@graftonhall.co.nz>
To: dev@lists.horde.org
References: <1007724265.3c10a6e95acfc@webmail.graftonhall.co.nz> <1007724931.3c10a9830654a@linux.wg.de>
In-Reply-To: <1007724931.3c10a9830654a@linux.wg.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Originating-IP: 10.0.0.4
X-MDRemoteIP: 127.0.0.1
X-Return-Path: mike@graftonhall.co.nz
X-MDaemon-Deliver-To: dev@lists.horde.org
Subject: Re: [dev] Kronolith Windows Patch
Ok.. it doesn't look like it conforms so I grabed 2 different algorithms for
calculating it and a piece of code from someone else... I implemented the 2
algoritms and ran all 3 against each other for a 20 year span and they all gave
the same result... the simplest algorithm was from
http://webexhibits.org/calendars/week.html#Anchor-48942
the other was:
http://personal.ecu.edu/mccartyr/ISOwdALG.txt
the code came from:
http://px.sklar.com/code-pretty.html?code_id=28
So the new patch that does away with the problem line and platform dependent
code is:
Index: kronolith/lib/Kronolith.php
===================================================================
RCS file: /repository/kronolith/lib/Kronolith.php,v
retrieving revision 1.43
diff -r1.43 Kronolith.php
192,193c192,197
<
< return strftime('%V', mktime(0, 0, 0, $month, $day, $year));
---
>
> $J = GregorianToJD($month, $day, $year);
> $d = ($J+31741 - ($J % 7)) % 146097 % 36524 % 1461;
> $L = floor($d/1460);
> $CorrectedDayInYear = (($d-$L) % 365) + $L;
> return floor($CorrectedDayInYear/7) + 1;
- Mike
Quoting Jan Schneider <jan@horde.org>:
>
> Are there any more comments on the msdn site if the weeknumber calculation
> is iso 8601 conform? If not we should rather use our own weeknumber
> function we used to have in Kronolith.php instead breaking compatability
> between Windows and *nix installations.
>
> Jan.
>
> ::::::::::::::::::::::::::::::::::::::::
> AMMMa AG - discover your knowledge
> :::::::::::::::::::::::::::
> Detmolder Str. 25-33 :: D-33604 Bielefeld
> fon +49.521.96878-0 :: fax +49.521.96878-20
> http://www.ammma.de
> ::::::::::::::::::::::::::::::::::::::::::::::
>
> --
> Horde Developers mailing list: http://horde.org/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe@lists.horde.org
>
>
>From jan@horde.org Date: Fri, 7 Dec 2001 15:16:57 +0100
Return-Path: <jan@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 52941 invoked from network); 7 Dec 2001 14:18:08 -0000
Received: from mailout03.sul.t-online.com (HELO mailout03.sul.t-online.de) (194.25.134.81)
by clark.horde.org with SMTP; 7 Dec 2001 14:18:08 -0000
Received: from fwd06.sul.t-online.de
by mailout03.sul.t-online.de with smtp
id 16CLpC-00058N-02; Fri, 07 Dec 2001 15:18:02 +0100
Received: from linux.wg.de (320034214675-0001@[217.225.43.97]) by fmrl06.sul.t-online.com
with esmtp id 16CLor-0NcYToC; Fri, 7 Dec 2001 15:17:41 +0100
Received: from localhost (localhost [127.0.0.1])
by linux.wg.de (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id fB7EGvk09688
for <dev@lists.horde.org>; Fri, 7 Dec 2001 15:16:57 +0100
Received: from 192.168.60.1 ( [192.168.60.1])
as user jan@linux by linux.wg.de with HTTP;
Fri, 7 Dec 2001 15:16:57 +0100
Message-ID: <1007734617.3c10cf591018b@linux.wg.de>
Date: Fri, 7 Dec 2001 15:16:57 +0100
From: Jan Schneider <jan@horde.org>
To: dev@lists.horde.org
References: <1007724265.3c10a6e95acfc@webmail.graftonhall.co.nz> <1007724931.3c10a9830654a@linux.wg.de> <1007734159.3c10cd8fd6ca4@webmail.graftonhall.co.nz>
In-Reply-To: <1007734159.3c10cd8fd6ca4@webmail.graftonhall.co.nz>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Sender: 320034214675-0001@t-dialin.net
Subject: Re: [dev] Kronolith Windows Patch
Zitat von Michael Cochrane <mike@graftonhall.co.nz>:
> Ok.. it doesn't look like it conforms so I grabed 2 different algorithms
> for
> calculating it and a piece of code from someone else... I implemented the
> 2
> algoritms and ran all 3 against each other for a 20 year span and they
> all gave
> the same result... the simplest algorithm was from
> http://webexhibits.org/calendars/week.html#Anchor-48942
> the other was:
> http://personal.ecu.edu/mccartyr/ISOwdALG.txt
> the code came from:
> http://px.sklar.com/code-pretty.html?code_id=28
>
> So the new patch that does away with the problem line and platform
> dependent
> code is:
>
> Index: kronolith/lib/Kronolith.php
> ===================================================================
> RCS file: /repository/kronolith/lib/Kronolith.php,v
> retrieving revision 1.43
> diff -r1.43 Kronolith.php
> 192,193c192,197
> <
> < return strftime('%V', mktime(0, 0, 0, $month, $day, $year));
> ---
> >
> > $J = GregorianToJD($month, $day, $year);
> > $d = ($J+31741 - ($J % 7)) % 146097 % 36524 % 1461;
> > $L = floor($d/1460);
> > $CorrectedDayInYear = (($d-$L) % 365) + $L;
> > return floor($CorrectedDayInYear/7) + 1;
Wow, this is a short one. Our last implementation of this algorithm was
alsmost three times as long.
I'll commit it to cvs, thanks!
Jan.
::::::::::::::::::::::::::::::::::::::::
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::