[Babase] Date convert command for season and hydrological year?
Susan Alberts
alberts at duke.edu
Fri Aug 27 16:53:21 EDT 2010
On Aug 27, 2010, at 10:23 AM, Karl O. Pinc wrote:
>
> 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.
OK this sounds good to me, can you let us know when you do it and in
the meantime we will use as is.
Susan
>
>> 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
>
>
> _______________________________________________
> Babase mailing list
> Babase at www.eco.princeton.edu
> http://www.eco.princeton.edu/mailman/listinfo/babase
------------------------------------------------------------
Susan Alberts, Dept of Biology, Duke University, Box 90338, Durham NC
27708. Phone 919-660-7272, FAX 919-660-7293
More information about the Babase
mailing list