Re: [Templates] Date and Time Template tool kit

2010-02-04 Thread Octavian Râsnita
From: hemanth reddy Hi [% close_time=2000/12/21 4:20:36 %]how to covert close_time to number of seconds since epochcan i do it using [%USE Date%]? [% MACRO dt(date) BLOCK; IF date.match('\d\d\d\d/\d\d/\d\d \d\d:\d\d:\d\d'); USE dt = DateTime(from_string = date, pattern = '%Y/%m/%d

Re: [Templates] Date and Time Template tool kit

2010-02-04 Thread Dave Cross
On 02/04/2010 06:55 AM, hemanth reddy wrote: Hi * * *[% close_time=2000/12/21 4:20:36 %] how to covert close_time to number of seconds since epoch can i do it using [%USE Date%]? No. But you can do it using Template::Plugin::DateTime (which you can get from CPAN[1]). [% USE

Re: [Templates] Date and Time Template tool kit

2010-02-04 Thread Bill Moseley
On Wed, Feb 3, 2010 at 10:55 PM, hemanth reddy hemd...@gmail.com wrote: Hi * * *[% close_time=2000/12/21 4:20:36 %] * Your specific question seem answered, but my question to you is do you really have hard-coded string dates in the templates? Seems like that kind of data would come from

Re: [Templates] Date and Time Template tool kit

2010-02-04 Thread hemanth reddy
Yes this data comes from a json source Thanks to all of you My Question is answered On Thu, Feb 4, 2010 at 6:48 PM, Bill Moseley mose...@hank.org wrote: On Wed, Feb 3, 2010 at 10:55 PM, hemanth reddy hemd...@gmail.com wrote: Hi * * *[% close_time=2000/12/21 4:20:36 %] * Your

Re: [Templates] Date and Time Template tool kit

2010-02-04 Thread Randal L. Schwartz
hemanth == hemanth reddy hemd...@gmail.com writes: hemanth Yes this data comes from a json source Well, that's the next level of crazy. Why is your controller code passing JSON to your template, instead of processing it first? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1

Re: [Templates] Date and Time Template tool kit

2010-02-04 Thread James G. Sack (jim)
I sent this Weds, but overlooked the necessity to reply all. I thought I should re-post in case it may be of interest, and because it points out a docs discrepancy. ..jim On 02/03/2010 10:55 PM, hemanth reddy wrote: Hi * * *[% close_time=2000/12/21 4:20:36 %] how to covert