Hi Gerritjan!
Please, allow me to follow this thread to initiate my understanding about
how to deal with date within XWiki! It seems to me that, at least, I'm
missing some basic concept!
On Fri, Jan 20, 2017 at 10:44 AM Gerritjan Koekkoek <gerritjan(a)cdlsworld.org>
wrote:
Reading the documentation of the XWiki JoDaTime module
(XWiki services
based) I feel it holds a lot of value next to $datetool and
$datecomparisontool (velocity based)
But I fail to understand the documentation
http://extensions.xwiki.org/xwiki/bin/view/Extension/Joda+Time+Plugin
As the examples are quite easy to read they did not clarify me enough to
just use date-values stored in XWiki XObjectProperties of type date
What default format does the property deliver; Should I use
$doc.Display(date-property)? , $doc.Display(date-property).value() or
$object.getProperty(date-property)
I've also added a date property to XWikiUsers class, populated it for a
bunch of users by editing objects and using the format described at
creation time and I'm not able to read it. $doc.Display(date-property)
reads something which is shown as an empty string, thus, nothing is shown,
and the the other two string area shown as is, thus they are interpreted as
text strings and are reading nothing from any object property!
What I understand from JoDaTime is that it is great to render dates in
'view' mode in the internationally localized format (Dutch Notation vs
English Notation), but when I switch to 'edit' mode how can I have a
DateWidget understands that format
So my simple question was to calculate the age based on a date-property in
a wiki object and Now?
I've played a bit with those JoDaTime example and do this...
http://portal.idisantiago.es/xwiki/bin/viewrev/ICT/PureTime/WebHome?rev=14.1
And I'm not happy with this as I'm still 51 years old! My birthday will be
next Sunday and my XWiki installation is set to System Default Timezone.
Please, anybody could explain me why XWiki is telling me that I'm already
52 year old? :-( Please, what am I missing?
Thank you so much!
Gerritjan Koekkoek
Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS
Visit our website<http://www.cdlsworld.org>
Facebook<https://www.facebook.com/gerritjan.koekkoek>
email<gerritjan(a)cdlsworld.org>
________________________________
From: users <users-bounces(a)xwiki.org> on behalf of [IDIS Technical
Secretariat] Ricardo Rodríguez <ricardo.rodriguez(a)idisantiago.es>
Sent: 20 January 2017 09:36:05
To: XWiki Users
Subject: Re: [xwiki-users] jodatime challenge
Thanks Vincent!
On Fri, Jan 20, 2017 at 9:06 AM Vincent Massol <vincent(a)massol.net> wrote:
Hi,
> On 20 Jan 2017, at 08:27, [IDIS Technical Secretariat] Ricardo
Rodríguez
<ricardo.rodriguez(a)idisantiago.es> wrote:
>
> Hi! The same code works fine in an XWiki 7.3 installation...
>
>
http://portal.idisantiago.es/xwiki/bin/view/ICT/PureDate/
>
> Thus, "my" problem is to find where ComparisonDateTool is located in
this
installation and make it works in a legacy XWiki Enterprise 2.4.30451
one.
Wow XE 2.4 is really old...
I don’t remember if the $datetool binding was available and it’s possible
that it wasn’t.
FYI it’s located in a java class in the xwiki-velocity*.jar file.
Yes, XE 2.4 is really a paleoXWiki installation! But it is still solving
some problems to me here! That pending migration is still a pending
migration/upgrade... Some notes on this issue in comments here...
http://atriumkm.idisantiago.es/bin/ICT/PureDate
I'll give it a try ASAP!
Cheers!
Thanks
-Vincent
Any help will be welcome! Thank!
On Thu, Jan 19, 2017 at 11:41 PM [IDIS Technical Secretariat] Ricardo
Rodríguez <ricardo.rodriguez(a)idisantiago.es> wrote:
> Hi! I've been these last days trying to regain access to an ancient
issue
>> while dealing with dates. Searching Jira I found this...
>>
>>
http://jira.xwiki.org/browse/XWIKI-5610?jql=text%20~%20%22datetool%22
>>
>> ... and this at XWiki Platforma site...
>>
>>
http://platform.xwiki.org/xwiki/bin/view/SRD/datetool
>>
>> To the best of my understanding ComparisonDateTool is implemented and
>> accessible through $datetool velocity variable. But I'm not able to
get
it
> working.
>
> On Thu, Jan 19, 2017 at 3:54 PM Hamster <teunham(a)hotmail.com> wrote:
>
> Have you checked the documentation for the DateTool
> <
>
https://velocity.apache.org/tools/devel/apidocs/org/apache/velocity/tools/g…
>>
> and the ComparisonDateTool
> <
>
https://velocity.apache.org/tools/devel/apidocs/org/apache/velocity/tools/g…
>>>
>> ?
>>
>>
>> Please, check this page...
>>
>>
http://atriumkm.idisantiago.es/bin/ICT/PureDate
>>
>> I'm able to get working the examples at DateTool page, but not those
at
>
ComparisonDateTool page. Please, could anybody point us in the right
> direction? Where are we failing?
>
>
> --
> View this message in context:
>
http://xwiki.475771.n2.nabble.com/jodatime-challenge-tp7602468p7602489.html
Sent from the XWiki- Users mailing list archive at
Nabble.com.
Thank you very much for your work!
Ricardo
--
Ricardo Rodríguez
Research Management and Promotion Technician
Technical Secretariat
Health Research Institute of Santiago de Compostela (IDIS)
http://www.idisantiago.es
--
Ricardo Rodríguez
Research Management and Promotion Technician
Technical Secretariat
Health Research Institute of Santiago de Compostela (IDIS)
http://www.idisantiago.es
--
Ricardo Rodríguez
Research Management and Promotion Technician
Technical Secretariat
Health Research Institute of Santiago de Compostela (IDIS)
http://www.idisantiago.es
--
Ricardo Rodríguez
Research Management and Promotion Technician
Technical Secretariat
Health Research Institute of Santiago de Compostela (IDIS)
http://www.idisantiago.es