[Babase] Date convert command for season and hydrological year?
Karl O. Pinc
kop at meme.com
Fri Aug 27 10:23:33 EDT 2010
On 08/27/2010 06:23:46 AM, Susan Alberts wrote:
> I've tested it - very nice! thanks.
It occurs to me that I should have the functions
take a text argument in addition to either a
date or a timestamp. That way one could write:
SELECT hydroyear('2010-08-27');
instead of having to write:
SELECT hydroyear('2010-08-27'::date);
It's not like people will be writing in dates
very often, but it's handy for testing and will
only take a moment. I don't have a moment right
now and it will probably have to wait a week.
> S
>
> On Aug 27, 2010, at 2:23 AM, Karl O. Pinc wrote:
>
> > Ok. This is done. We have two functions:
> >
> > hydroyear() Takes a date and returns the hydrological year.
> > http://papio.biology.duke.edu/babase_system_html/re08.html
> >
> > season() Takes a date and returns a code for the season.
> > http://papio.biology.duke.edu/babase_system_html/re09.html
> >
> > Please test and if it looks like it works Niki may want
> > to announce on the babaseannounce mailing list.
> >
> > On 08/16/2010 08:48:27 AM, Niki Learn wrote:
> >> Karl,
> >>
> >> Our hydrological years run from November through October with say
> >> November
> >> 2008 to October 2009 being hydrological year 2009. Wet season is
> >> November
> >> through May and dry season is June through October.
> >>
> >> -----Original Message-----
> >> From: babase-bounces at eeblistserv.Princeton.EDU
> >> [mailto:babase-bounces at eeblistserv.Princeton.EDU] On Behalf Of
> Karl
> >> O.
> >> Pinc
> >> Sent: Sunday, August 15, 2010 8:13 PM
> >> To: The Baboon Database Project
> >> Subject: Re: [Babase] Date convert command for season and
> >> hydrological
> >> year?
> >>
> >> On 08/15/2010 09:05:22 AM, Catherine Markham wrote:
> >>> Hi all,
> >>>
> >>> Is there is a command to convert a date to a both season (wet vs
> >> dry)
> >>> and hydrological year? If not, would it be possible add this to
> >> the
> >>
> >>> Babase request list (assuming I'm not the only one who would use
> >> it)?
> >>
> >> It seems simple enough to do in a spare moment, but I need to know
> >> how to do the conversion. When is wet and dry season? I think
> >> I was told when hydrological year starts and ends but it wouldn't
> >> hurt if you told me again and I had it all in the same place
> >> when I start to code.
> >>
> >> Karl <kop at meme.com>
> >> Free Software: "You don't pay back, you pay forward."
> >> -- Robert A. Heinlein
> >>
> >>
> >> _______________________________________________
> >> Babase mailing list
> >> Babase at www.eco.princeton.edu
> >> http://www.eco.princeton.edu/mailman/listinfo/babase
> >>
> >> _______________________________________________
> >> Babase mailing list
> >> Babase at www.eco.princeton.edu
> >> http://www.eco.princeton.edu/mailman/listinfo/babase
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> > Karl <kop at meme.com>
> > Free Software: "You don't pay back, you pay forward."
> > -- Robert A. Heinlein
> >
> >
> > _______________________________________________
> > Babase mailing list
> > Babase at www.eco.princeton.edu
> > http://www.eco.princeton.edu/mailman/listinfo/babase
>
> --------------------------------------------------------
> Susan Alberts, Professor of Biology, Duke University, Box 90338,
> Durham NC 27708, 919-660-7272 (Ph), 919-660-7293 (Fax)
>
>
>
>
>
> _______________________________________________
> Babase mailing list
> Babase at www.eco.princeton.edu
> http://www.eco.princeton.edu/mailman/listinfo/babase
>
>
Karl <kop at meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
More information about the Babase
mailing list