You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by "Goran Karlic (JIRA)" <ji...@apache.org> on 2008/04/10 11:58:05 UTC

[jira] Created: (JSPWIKI-240) Date and time formats

Date and time formats
---------------------

                 Key: JSPWIKI-240
                 URL: https://issues.apache.org/jira/browse/JSPWIKI-240
             Project: JSPWiki
          Issue Type: Improvement
          Components: Localization
    Affects Versions: 2.6.1
         Environment: Any
            Reporter: Goran Karlic
            Priority: Trivial


+This issue was changed to better reflect the initiated discussion+

Focus is on:

* How DateTimes are *stored* internally, for example as page content or metadata (comments etc.)
* How they are *rendered* to end-users in their browsers

{quote}
The original issue name was:  _Date and time formats according to ISO 8601_. 

We have multiple occurences of hard-coded or context-unaware DateTime to String conversions (page properties, JSPs, templates).

My proposal is to rely on an international standard instead of using an invented default. The current international standard is ISO 8601 (s. Wikipedia). My further proposal is to show time with the precision to the second, as the SI unit system defines the second as the basic unit of time. Furthermore "GMT" is replaced by "UTC" and they might differ up to a second (s. Wikipedia).

I think this will make unlocalized strings more transparent to the users and easier to decode correctly (consider 02/03/08 - is it in the future or in the past - or might it even be the current time?!).

Following this proposal java format strings allowed for above cases would be: 

(1) Simple date: "yyyy-MM-dd" ("The daily mail for 2008-02-20 was sent")
(2) Date and time
(2.1) Explicit time context: "yyyy-MM-dd hh:mm:ssZ" ("User gkarlic made this at 2008-02-20 22:38:10+0100")
(2.2) Implicit time context: "yyyy-MM-dd hh:mm:ss" ("This server lives on CET, here it is 2008-02-20 22:38:10")

Where (2.1) would be used for strings that might emerge from different time-zones.

If others agree with this proposal, I would gladly make the required changes.
{quote}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Resolved: (JSPWIKI-240) Date plugin modification

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
No, the answer is to open up a new issue in JIRA, and then debate the  
merits and cons.  It would probably be best to develop it as a  
contributed plugin and put it in jspwiki.org.  Then we can discuss  
whether it is worth to support it as a core plugin, because taking it  
in means that the development team must start supporting it.  I don't  
want to end up in the same situation as with WikiWizard that there is  
no support for it, yet it is a part of the distro.

This particular bug was about fixing some mythical Date plugin, which  
does not exist, and therefore it is invalid.

/Janne

On 12 Apr 2008, at 19:13, Christophe Dupriez wrote:
> Hey Janne! Goran says he has done the job (last line) and describe  
> the specs of it. He asks if he can contribute it.
> The answer is probably "you are very welcome to attach it into  
> JIRA". Is'nt it?
>
> May be the answer is "This is a Plugin: please add it into the Wiki  
> instead" ?
>
> Christophe
>
> Janne Jalkanen (JIRA) a écrit :
>>      [ https://issues.apache.org/jira/browse/JSPWIKI-240? 
>> page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>>
>> Janne Jalkanen resolved JSPWIKI-240.
>> ------------------------------------
>>
>>     Resolution: Won't Fix
>>
>> There is no Date plugin in JSPWiki.  Declaring this invalid.
>>
>>
>>> Date plugin modification
>>> ------------------------
>>>
>>>                 Key: JSPWIKI-240
>>>                 URL: https://issues.apache.org/jira/browse/ 
>>> JSPWIKI-240
>>>             Project: JSPWiki
>>>          Issue Type: Improvement
>>>          Components: Plugins
>>>    Affects Versions: 2.6.2
>>>         Environment: Any
>>>            Reporter: Goran Karlic
>>>            Priority: Trivial
>>>
>>> _This issue originated from JSPWIKI-196_
>>> The *Date Plugin* needs to be modified in order to enable it to  
>>> represent points in time that are stored in an format independent  
>>> way.
>>> # Optional property {{format}} specified the format used for  
>>> output (_no modification_)
>>> ## If not specified reverts to the user's prefered format
>>> # Optional property {{value}} stores the date according to  
>>> {{jspwiki.defaultprefs.template.dateformat}} (e.g. yyyy-MM-dd  
>>> HH:mm:ssZ)
>>> ## If not specified reverts to the current date and time
>>> This allows the Date Plugin to be used in several ways:
>>> * {{[{Date}]}} would output the current time in the user's  
>>> prefered format
>>> * {{[{Date format='dd.MM.yyyy'}]}} would output  the current time  
>>> in the specfied format
>>> * {{[{Date format='dd.MM.yyyy' value='2008-01-31'}]}} would  
>>> output {{31.01.2008}}
>>> * {{[{Date value='2008-04-10 18:20:30+0200'}]}} would output the  
>>> specified point in time in the user's prefered format
>>> That can be used to do things like:
>>> {noformat}
>>> -- a.einstein commented this at [{Date value='1905-04-10 18:20:30 
>>> +0100'}]
>>> {noformat}
>>> and would allow that date and time values are stored independent  
>>> of their final representation format.
>>> *I wrote the Date Plugin as descibed above - what's the right way  
>>> to get it to included in the next build?*
>>>
>>
>>
>


Re: [jira] Resolved: (JSPWIKI-240) Date plugin modification

Posted by Christophe Dupriez <ch...@destin.be>.
Hey Janne! Goran says he has done the job (last line) and describe the 
specs of it. He asks if he can contribute it.
The answer is probably "you are very welcome to attach it into JIRA". 
Is'nt it?

May be the answer is "This is a Plugin: please add it into the Wiki 
instead" ?

Christophe

Janne Jalkanen (JIRA) a écrit :
>      [ https://issues.apache.org/jira/browse/JSPWIKI-240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Janne Jalkanen resolved JSPWIKI-240.
> ------------------------------------
>
>     Resolution: Won't Fix
>
> There is no Date plugin in JSPWiki.  Declaring this invalid.
>
>   
>> Date plugin modification
>> ------------------------
>>
>>                 Key: JSPWIKI-240
>>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-240
>>             Project: JSPWiki
>>          Issue Type: Improvement
>>          Components: Plugins
>>    Affects Versions: 2.6.2
>>         Environment: Any
>>            Reporter: Goran Karlic
>>            Priority: Trivial
>>
>> _This issue originated from JSPWIKI-196_
>> The *Date Plugin* needs to be modified in order to enable it to represent points in time that are stored in an format independent way.
>> # Optional property {{format}} specified the format used for output (_no modification_)
>> ## If not specified reverts to the user's prefered format
>> # Optional property {{value}} stores the date according to {{jspwiki.defaultprefs.template.dateformat}} (e.g. yyyy-MM-dd HH:mm:ssZ)
>> ## If not specified reverts to the current date and time
>> This allows the Date Plugin to be used in several ways:
>> * {{[{Date}]}} would output the current time in the user's prefered format
>> * {{[{Date format='dd.MM.yyyy'}]}} would output  the current time in the specfied format
>> * {{[{Date format='dd.MM.yyyy' value='2008-01-31'}]}} would output {{31.01.2008}}
>> * {{[{Date value='2008-04-10 18:20:30+0200'}]}} would output the specified point in time in the user's prefered format
>> That can be used to do things like:
>> {noformat}
>> -- a.einstein commented this at [{Date value='1905-04-10 18:20:30+0100'}]
>> {noformat}
>> and would allow that date and time values are stored independent of their final representation format.
>> *I wrote the Date Plugin as descibed above - what's the right way to get it to included in the next build?*
>>     
>
>   


[jira] Resolved: (JSPWIKI-240) Date plugin modification

Posted by "Janne Jalkanen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JSPWIKI-240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Janne Jalkanen resolved JSPWIKI-240.
------------------------------------

    Resolution: Won't Fix

There is no Date plugin in JSPWiki.  Declaring this invalid.

> Date plugin modification
> ------------------------
>
>                 Key: JSPWIKI-240
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-240
>             Project: JSPWiki
>          Issue Type: Improvement
>          Components: Plugins
>    Affects Versions: 2.6.2
>         Environment: Any
>            Reporter: Goran Karlic
>            Priority: Trivial
>
> _This issue originated from JSPWIKI-196_
> The *Date Plugin* needs to be modified in order to enable it to represent points in time that are stored in an format independent way.
> # Optional property {{format}} specified the format used for output (_no modification_)
> ## If not specified reverts to the user's prefered format
> # Optional property {{value}} stores the date according to {{jspwiki.defaultprefs.template.dateformat}} (e.g. yyyy-MM-dd HH:mm:ssZ)
> ## If not specified reverts to the current date and time
> This allows the Date Plugin to be used in several ways:
> * {{[{Date}]}} would output the current time in the user's prefered format
> * {{[{Date format='dd.MM.yyyy'}]}} would output  the current time in the specfied format
> * {{[{Date format='dd.MM.yyyy' value='2008-01-31'}]}} would output {{31.01.2008}}
> * {{[{Date value='2008-04-10 18:20:30+0200'}]}} would output the specified point in time in the user's prefered format
> That can be used to do things like:
> {noformat}
> -- a.einstein commented this at [{Date value='1905-04-10 18:20:30+0100'}]
> {noformat}
> and would allow that date and time values are stored independent of their final representation format.
> *I wrote the Date Plugin as descibed above - what's the right way to get it to included in the next build?*

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JSPWIKI-240) Date plugin modification

Posted by "Dirk Frederickx (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588269#action_12588269 ] 

Dirk Frederickx commented on JSPWIKI-240:
-----------------------------------------

janne,

I think it does make sense to have such a plugin.
It allows a wiki-page to specify a Date (or Time) and the jspwiki-engine would represent it according the jspwiki user-preferred timeformat.

I'd suggest to keep this plugin very simply and only allow for a value parameter, and no format parameter.
In [JSPWIKI-196] it was suggested to use the ISO8601 format as input.

{{{
Lorem ipsum dolor sit amet, [{DATE value='20080229' }]  consectetuer adipiscing elit.
}}}


It could also be convenient for other plugins, which need to publish a date, to use this plugin as a helper.



dirk

> Date plugin modification
> ------------------------
>
>                 Key: JSPWIKI-240
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-240
>             Project: JSPWiki
>          Issue Type: Improvement
>          Components: Plugins
>    Affects Versions: 2.6.2
>         Environment: Any
>            Reporter: Goran Karlic
>            Priority: Trivial
>
> _This issue originated from JSPWIKI-196_
> The *Date Plugin* needs to be modified in order to enable it to represent points in time that are stored in an format independent way.
> # Optional property {{format}} specified the format used for output (_no modification_)
> ## If not specified reverts to the user's prefered format
> # Optional property {{value}} stores the date according to {{jspwiki.defaultprefs.template.dateformat}} (e.g. yyyy-MM-dd HH:mm:ssZ)
> ## If not specified reverts to the current date and time
> This allows the Date Plugin to be used in several ways:
> * {{[{Date}]}} would output the current time in the user's prefered format
> * {{[{Date format='dd.MM.yyyy'}]}} would output  the current time in the specfied format
> * {{[{Date format='dd.MM.yyyy' value='2008-01-31'}]}} would output {{31.01.2008}}
> * {{[{Date value='2008-04-10 18:20:30+0200'}]}} would output the specified point in time in the user's prefered format
> That can be used to do things like:
> {noformat}
> -- a.einstein commented this at [{Date value='1905-04-10 18:20:30+0100'}]
> {noformat}
> and would allow that date and time values are stored independent of their final representation format.
> *I wrote the Date Plugin as descibed above - what's the right way to get it to included in the next build?*

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JSPWIKI-240) Date plugin modification

Posted by "Goran Karlic (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588320#action_12588320 ] 

Goran Karlic commented on JSPWIKI-240:
--------------------------------------

I am sorry for the confisuion. The Date Plugin of course does not exist - but, as Dirk points out, it would be great if it existed. I wrote this very simple plugin and would like it to be included in one of the next builds...

Following Dirk, It has only one parameter {{value}}. 

The only question that is left open is the Date/Time format of {{value}}:
* ISO8601
** _Using this would make it independent of changes in {{jspwiki.defaultprefs.template.dateformat}} and compatible between different JSPWikis_
* {{jspwiki.defaultprefs.template.dateformat}}
** _Changing {{jspwiki.defaultprefs.template.dateformat}} would break existing occurences_

> Date plugin modification
> ------------------------
>
>                 Key: JSPWIKI-240
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-240
>             Project: JSPWiki
>          Issue Type: Improvement
>          Components: Plugins
>    Affects Versions: 2.6.2
>         Environment: Any
>            Reporter: Goran Karlic
>            Priority: Trivial
>
> _This issue originated from JSPWIKI-196_
> The *Date Plugin* needs to be modified in order to enable it to represent points in time that are stored in an format independent way.
> # Optional property {{format}} specified the format used for output (_no modification_)
> ## If not specified reverts to the user's prefered format
> # Optional property {{value}} stores the date according to {{jspwiki.defaultprefs.template.dateformat}} (e.g. yyyy-MM-dd HH:mm:ssZ)
> ## If not specified reverts to the current date and time
> This allows the Date Plugin to be used in several ways:
> * {{[{Date}]}} would output the current time in the user's prefered format
> * {{[{Date format='dd.MM.yyyy'}]}} would output  the current time in the specfied format
> * {{[{Date format='dd.MM.yyyy' value='2008-01-31'}]}} would output {{31.01.2008}}
> * {{[{Date value='2008-04-10 18:20:30+0200'}]}} would output the specified point in time in the user's prefered format
> That can be used to do things like:
> {noformat}
> -- a.einstein commented this at [{Date value='1905-04-10 18:20:30+0100'}]
> {noformat}
> and would allow that date and time values are stored independent of their final representation format.
> *I wrote the Date Plugin as descibed above - what's the right way to get it to included in the next build?*

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JSPWIKI-240) Date plugin modification

Posted by "Janne Jalkanen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588281#action_12588281 ] 

Janne Jalkanen commented on JSPWIKI-240:
----------------------------------------

This bug is about some mythical Date plugin which does not exist.  If someone wants to have such a plugin, they should file a new improvement request.

> Date plugin modification
> ------------------------
>
>                 Key: JSPWIKI-240
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-240
>             Project: JSPWiki
>          Issue Type: Improvement
>          Components: Plugins
>    Affects Versions: 2.6.2
>         Environment: Any
>            Reporter: Goran Karlic
>            Priority: Trivial
>
> _This issue originated from JSPWIKI-196_
> The *Date Plugin* needs to be modified in order to enable it to represent points in time that are stored in an format independent way.
> # Optional property {{format}} specified the format used for output (_no modification_)
> ## If not specified reverts to the user's prefered format
> # Optional property {{value}} stores the date according to {{jspwiki.defaultprefs.template.dateformat}} (e.g. yyyy-MM-dd HH:mm:ssZ)
> ## If not specified reverts to the current date and time
> This allows the Date Plugin to be used in several ways:
> * {{[{Date}]}} would output the current time in the user's prefered format
> * {{[{Date format='dd.MM.yyyy'}]}} would output  the current time in the specfied format
> * {{[{Date format='dd.MM.yyyy' value='2008-01-31'}]}} would output {{31.01.2008}}
> * {{[{Date value='2008-04-10 18:20:30+0200'}]}} would output the specified point in time in the user's prefered format
> That can be used to do things like:
> {noformat}
> -- a.einstein commented this at [{Date value='1905-04-10 18:20:30+0100'}]
> {noformat}
> and would allow that date and time values are stored independent of their final representation format.
> *I wrote the Date Plugin as descibed above - what's the right way to get it to included in the next build?*

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JSPWIKI-240) Date plugin modification

Posted by "Dirk Frederickx (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629527#action_12629527 ] 

Dirk Frederickx commented on JSPWIKI-240:
-----------------------------------------

Goran,

Can you attach a patch with the new plugin.


dirk

> Date plugin modification
> ------------------------
>
>                 Key: JSPWIKI-240
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-240
>             Project: JSPWiki
>          Issue Type: Improvement
>          Components: Plugins
>    Affects Versions: 2.6.2
>         Environment: Any
>            Reporter: Goran Karlic
>            Priority: Trivial
>
> _This issue originated from JSPWIKI-196_
> Intoduce a new *Date Plugin* that allows date/time to be stored independent of their final representation format.
> * Property {{value}} stores the date/time value
> * Plugin renders {{value}} using user's prefered Date/Time format
> Example:
> {noformat}
> -- a.einstein commented this at [{Date value='1905-04-10 18:20:30+0100'}]
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.