[jira] Created: (SLING-289) dates do not come along as dates

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (SLING-289) dates do not come along as dates

Andrei Shilov (Jira)
dates do not come along as dates
--------------------------------

                 Key: SLING-289
                 URL: https://issues.apache.org/jira/browse/SLING-289
             Project: Sling
          Issue Type: Bug
          Components: Scripting
            Reporter: Michael Marth


(this is on Launchpad revision 629151 running on top of crx)

my content model has a date-type property. If I access this property in an .esp I do not get a date object (but a string I suppose).
e.g.
currentNode["mydateproperty"].getFullYear() gives:
TypeError: Cannot find function getFullYear

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


Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (SLING-289) dates do not come along as dates

Andrei Shilov (Jira)

     [ https://issues.apache.org/jira/browse/SLING-289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger reassigned SLING-289:
---------------------------------------

    Assignee: Felix Meschberger

> dates do not come along as dates
> --------------------------------
>
>                 Key: SLING-289
>                 URL: https://issues.apache.org/jira/browse/SLING-289
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>            Reporter: Michael Marth
>            Assignee: Felix Meschberger
>
> (this is on Launchpad revision 629151 running on top of crx)
> my content model has a date-type property. If I access this property in an .esp I do not get a date object (but a string I suppose).
> e.g.
> currentNode["mydateproperty"].getFullYear() gives:
> TypeError: Cannot find function getFullYear

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


Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SLING-289) dates do not come along as dates

Andrei Shilov (Jira)
In reply to this post by Andrei Shilov (Jira)

    [ https://issues.apache.org/jira/browse/SLING-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581874#action_12581874 ]

Felix Meschberger commented on SLING-289:
-----------------------------------------

Problem is that the ScriptableNode.get(String) method does not support the full range of property types. Fixing this by using the JcrResourceUtil.toJavaObject method which supports all types properly.

> dates do not come along as dates
> --------------------------------
>
>                 Key: SLING-289
>                 URL: https://issues.apache.org/jira/browse/SLING-289
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>            Reporter: Michael Marth
>            Assignee: Felix Meschberger
>
> (this is on Launchpad revision 629151 running on top of crx)
> my content model has a date-type property. If I access this property in an .esp I do not get a date object (but a string I suppose).
> e.g.
> currentNode["mydateproperty"].getFullYear() gives:
> TypeError: Cannot find function getFullYear

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


Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (SLING-289) dates do not come along as dates

Andrei Shilov (Jira)
In reply to this post by Andrei Shilov (Jira)

     [ https://issues.apache.org/jira/browse/SLING-289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger resolved SLING-289.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0

Fixed in Rev. 640774 as indicated.

Please close, if this fixes your issue. Thanks.

> dates do not come along as dates
> --------------------------------
>
>                 Key: SLING-289
>                 URL: https://issues.apache.org/jira/browse/SLING-289
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>            Reporter: Michael Marth
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>
> (this is on Launchpad revision 629151 running on top of crx)
> my content model has a date-type property. If I access this property in an .esp I do not get a date object (but a string I suppose).
> e.g.
> currentNode["mydateproperty"].getFullYear() gives:
> TypeError: Cannot find function getFullYear

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