Re: [xwiki-users] using XWQL with additional search criterias by dates

2010-10-24 Thread [Ricardo Rodriguez] eBioTIC.
Hi [Ricardo Rodriguez] eBioTIC. wrote: > Hi Eugen, > > Eugen Colesnicov wrote: > >> Hi Sergiu! >> >> I played before with jodatime. It have some problems ... >> For example, I tried to use example script from plugin home page (it can be >> usefull in my situation) and this script doesn't workin

Re: [xwiki-users] using XWQL with additional search criterias by dates

2010-10-24 Thread [Ricardo Rodriguez] eBioTIC.
Hi! Eugen Colesnicov wrote: > I checked this example and your script - it is not correct, because you > compare separately year, month and day of document with current date - year, > month and day-100. But if, for example now is 02 january, your script give > uncorrect result, becase I also should

Re: [xwiki-users] using XWQL with additional search criterias by dates

2010-10-23 Thread [Ricardo Rodriguez] eBioTIC.
Hi Eugen, Eugen Colesnicov wrote: > Hi Sergiu! > > I played before with jodatime. It have some problems ... > For example, I tried to use example script from plugin home page (it can be > usefull in my situation) and this script doesn't working: > #set($formatter = > $xwiki.jodatime.getDateTimeFo

Re: [xwiki-users] using XWQL with additional search criterias by dates

2010-10-23 Thread Eugen Colesnicov
Hi Sergiu! I played before with jodatime. It have some problems ... For example, I tried to use example script from plugin home page (it can be usefull in my situation) and this script doesn't working: #set($formatter = $xwiki.jodatime.getDateTimeFormatterForPattern('.MM.dd')) #set($myBirthd

Re: [xwiki-users] using XWQL with additional search criterias by dates

2010-10-23 Thread Sergiu Dumitriu
On 10/23/2010 10:45 PM, Eugen Colesnicov wrote: > > I checked this example and your script - it is not correct, because you > compare separately year, month and day of document with current date - year, > month and day-100. But if, for example now is 02 january, your script give > uncorrect result,

Re: [xwiki-users] using XWQL with additional search criterias by dates

2010-10-23 Thread Eugen Colesnicov
I checked this example and your script - it is not correct, because you compare separately year, month and day of document with current date - year, month and day-100. But if, for example now is 02 january, your script give uncorrect result, becase I also should change year and month (and year), t

Re: [xwiki-users] using XWQL with additional search criterias by dates

2010-10-23 Thread [Ricardo Rodriguez] eBioTIC.
Hi! Eugen Colesnicov wrote: > Thanks, Ricardo! But for me your example is not enough. > > I need to filter not by fixed date, but for dynamic criteria - current date > - 5 days ... > How is it possible? > Well, this is not hard to do... after the examples shown here... http://platform.xwiki.o

Re: [xwiki-users] using XWQL with additional search criterias by dates

2010-10-23 Thread Eugen Colesnicov
Thanks, Ricardo! But for me your example is not enough. I need to filter not by fixed date, but for dynamic criteria - current date - 5 days ... How is it possible? Maybe I should do it by 2 steps: 1) set target date (current date - 5 days) as value, 2) use this target date (fixed value) as a fi

Re: [xwiki-users] using XWQL with additional search criterias by dates

2010-10-22 Thread [Ricardo Rodriguez] eBioTIC.
Hi! Eugen Colesnicov wrote: > Hi! Maybe somebody can help me. > > I need to select some docs with own class. Together I need 3 filters: > 1) by class: only "myclass" > 2) by property value: where "myproperty" = "myvalue" > 3) by date: where doc date = current date - 5 days > I created xwql script

[xwiki-users] using XWQL with additional search criterias by dates

2010-10-21 Thread Eugen Colesnicov
Hi! Maybe somebody can help me. I need to select some docs with own class. Together I need 3 filters: 1) by class: only "myclass" 2) by property value: where "myproperty" = "myvalue" 3) by date: where doc date = current date - 5 days I created xwql script with 2 creterias and it's working well: