You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by "Dirk Frederickx (JIRA)" <ji...@apache.org> on 2008/09/09 18:51:44 UTC
[jira] Commented: (JSPWIKI-373) jspwiki-edit.js: sign - Date (25
Sep 07) is a hard coded string in javascript-file
[ https://issues.apache.org/jira/browse/JSPWIKI-373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629526#action_12629526 ]
Dirk Frederickx commented on JSPWIKI-373:
-----------------------------------------
This is a bug.
I am still puzzled about the format of the DATE to be inserted.
Why not try to use the date/time format defined in the user-preferences.
See also [JSPWIKI-240]
dirk
> jspwiki-edit.js: sign - Date (25 Sep 07) is a hard coded string in javascript-file
> ----------------------------------------------------------------------------------
>
> Key: JSPWIKI-373
> URL: https://issues.apache.org/jira/browse/JSPWIKI-373
> Project: JSPWiki
> Issue Type: Bug
> Components: Editors
> Affects Versions: 2.6.3, 2.8
> Environment: All platforms and browsers
> Reporter: Stefan Bohn
> Priority: Trivial
>
> ,sign:{snippet:["\\\\\n--",Wiki.UserName+", 25 Sep 07","\n"],tab:[Wiki.UserName,"25 Sep 07",""]}
> 25 Sep 07 is hard coded
> Solution:
> var now = new Date();
> var day = ((now.getDate() < 10) ? "0" + now.getDate() : now.getDate())
> var month = ((now.getMonth() < 10) ? "0" + now.getMonth() : now.getMonth())
> var currentDate = now.getFullYear() + "-" + month + "-" + day;
> ,sign:{snippet:["\\\\\n--",Wiki.UserName+", " + currentDate,"\n"],tab:[Wiki.UserName,currentDate,""]}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.