You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Naveen Kumar <na...@gmail.com> on 2010/09/30 13:15:56 UTC

Groovy DateTime Issue

Hi All,

I am writing an automated script which updates payment table to collect
payment for next consecutive 5 months on the same date, that is, If today is
the first payment (30-09-2010) then next 4 payment will be on the same date
of subsequent months(30-10-2010, 30-11-2010, ....), Can anyone suggest me
how to implement this in groovy.

Regards,
Naveen.

Re: Groovy DateTime Issue

Posted by Naveen Kumar <na...@gmail.com>.
Hi Brajesh,

Thanks for Information.

Regards,
Naveen.

On Thu, Sep 30, 2010 at 5:55 PM, Brajesh Patel <
brajesh.patel@hotwaxmedia.com> wrote:

> Hello Naveen,
> I think for this functionality(next consecutive step means 30-10-2010,
> 30-11-2010), you can use formatInterval(double interval, int count, Locale
> locale) method of the UtilDateTime.java.
>
> --
> thanks
> Brajesh
>
>
> Naveen Kumar wrote:
>
>> Hi All,
>>
>> I am writing an automated script which updates payment table to collect
>> payment for next consecutive 5 months on the same date, that is, If today
>> is
>> the first payment (30-09-2010) then next 4 payment will be on the same
>> date
>> of subsequent months(30-10-2010, 30-11-2010, ....), Can anyone suggest me
>> how to implement this in groovy.
>>
>> Regards,
>> Naveen.
>>
>>
>>
>
>

Re: Groovy DateTime Issue

Posted by Brajesh Patel <br...@hotwaxmedia.com>.
Hello Naveen,
I think for this functionality(next consecutive step means 30-10-2010, 
30-11-2010), you can use formatInterval(double interval, int count, 
Locale locale) method of the UtilDateTime.java.

--
thanks
Brajesh

Naveen Kumar wrote:
> Hi All,
>
> I am writing an automated script which updates payment table to collect
> payment for next consecutive 5 months on the same date, that is, If today is
> the first payment (30-09-2010) then next 4 payment will be on the same date
> of subsequent months(30-10-2010, 30-11-2010, ....), Can anyone suggest me
> how to implement this in groovy.
>
> Regards,
> Naveen.
>
>   


Re: Groovy DateTime Issue

Posted by Naveen Kumar <na...@gmail.com>.
Hi Adrian,

Thanks for that Document, I helped me.

Regards,
Naveen.

On Thu, Sep 30, 2010 at 6:19 PM, Adrian Crum <ad...@yahoo.com> wrote:

> Take a look at the temporal expressions:
>
> https://cwiki.apache.org/confluence/display/OFBENDUSER/Temporal+Expressions
>
> -Adrian
>
> --- On Thu, 9/30/10, Naveen Kumar <na...@gmail.com> wrote:
>
> > From: Naveen Kumar <na...@gmail.com>
> > Subject: Groovy DateTime Issue
> > To: user@ofbiz.apache.org
> > Date: Thursday, September 30, 2010, 4:15 AM
> > Hi All,
> >
> > I am writing an automated script which updates payment
> > table to collect
> > payment for next consecutive 5 months on the same date,
> > that is, If today is
> > the first payment (30-09-2010) then next 4 payment will be
> > on the same date
> > of subsequent months(30-10-2010, 30-11-2010, ....), Can
> > anyone suggest me
> > how to implement this in groovy.
> >
> > Regards,
> > Naveen.
> >
>
>
>
>

Re: Groovy DateTime Issue

Posted by Adrian Crum <ad...@yahoo.com>.
Take a look at the temporal expressions:

https://cwiki.apache.org/confluence/display/OFBENDUSER/Temporal+Expressions

-Adrian

--- On Thu, 9/30/10, Naveen Kumar <na...@gmail.com> wrote:

> From: Naveen Kumar <na...@gmail.com>
> Subject: Groovy DateTime Issue
> To: user@ofbiz.apache.org
> Date: Thursday, September 30, 2010, 4:15 AM
> Hi All,
> 
> I am writing an automated script which updates payment
> table to collect
> payment for next consecutive 5 months on the same date,
> that is, If today is
> the first payment (30-09-2010) then next 4 payment will be
> on the same date
> of subsequent months(30-10-2010, 30-11-2010, ....), Can
> anyone suggest me
> how to implement this in groovy.
> 
> Regards,
> Naveen.
>