Groovy DateTime Issue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Groovy DateTime Issue

Naveen Kumar-3
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.
Reply | Threaded
Open this post in threaded view
|

Re: Groovy DateTime Issue

Brajesh Patel-2
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.
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: Groovy DateTime Issue

Adrian Crum-2
In reply to this post by Naveen Kumar-3
Take a look at the temporal expressions:

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

-Adrian

--- On Thu, 9/30/10, Naveen Kumar <[hidden email]> wrote:

> From: Naveen Kumar <[hidden email]>
> Subject: Groovy DateTime Issue
> To: [hidden email]
> 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.
>


     
Reply | Threaded
Open this post in threaded view
|

Re: Groovy DateTime Issue

Naveen Kumar-3
In reply to this post by Brajesh Patel-2
Hi Brajesh,

Thanks for Information.

Regards,
Naveen.

On Thu, Sep 30, 2010 at 5:55 PM, Brajesh Patel <
[hidden email]> 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.
>>
>>
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Groovy DateTime Issue

Naveen Kumar-3
In reply to this post by Adrian Crum-2
Hi Adrian,

Thanks for that Document, I helped me.

Regards,
Naveen.

On Thu, Sep 30, 2010 at 6:19 PM, Adrian Crum <[hidden email]> 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 <[hidden email]> wrote:
>
> > From: Naveen Kumar <[hidden email]>
> > Subject: Groovy DateTime Issue
> > To: [hidden email]
> > 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.
> >
>
>
>
>