You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Knodi (JIRA)" <ji...@apache.org> on 2011/09/14 04:36:09 UTC

[jira] [Created] (COUCHDB-1280) ISO8601 parsing in view

ISO8601 parsing in view
-----------------------

                 Key: COUCHDB-1280
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1280
             Project: CouchDB
          Issue Type: New Feature
          Components: JavaScript View Server
    Affects Versions: 1.0.2
         Environment: All
            Reporter: Knodi
            Priority: Minor


The current js view server doesn't parse Date format ISO8601. This is a widely used date format and date parse class should be made to parse ISO8601.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1280) ISO8601 parsing in view

Posted by "Randall Leeds (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104216#comment-13104216 ] 

Randall Leeds commented on COUCHDB-1280:
----------------------------------------

I apologize. It's necessary to use the 'new' keyword with Date in order to construct a date from a string.

> ISO8601 parsing in view
> -----------------------
>
>                 Key: COUCHDB-1280
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1280
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: JavaScript View Server
>    Affects Versions: 1.0.2
>         Environment: All
>            Reporter: Knodi
>            Priority: Minor
>              Labels: ISO8601, date, datetime
>
> The current js view server doesn't parse Date format ISO8601. This is a widely used date format and date parse class should be made to parse ISO8601.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1280) ISO8601 parsing in view

Posted by "Randall Leeds (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104199#comment-13104199 ] 

Randall Leeds commented on COUCHDB-1280:
----------------------------------------

I'm not sure what you mean. I just tried putting a ISO8601 date string in a document on the date property. Running a view that does emit(null, Date(doc.date).toTimeString()) seems to work no problem, indicating it's parsing without issue.

Could you please clarify your issue or expectations?

> ISO8601 parsing in view
> -----------------------
>
>                 Key: COUCHDB-1280
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1280
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: JavaScript View Server
>    Affects Versions: 1.0.2
>         Environment: All
>            Reporter: Knodi
>            Priority: Minor
>              Labels: ISO8601, date, datetime
>
> The current js view server doesn't parse Date format ISO8601. This is a widely used date format and date parse class should be made to parse ISO8601.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1280) ISO8601 parsing in view

Posted by "Knodi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104219#comment-13104219 ] 

Knodi commented on COUCHDB-1280:
--------------------------------

Also tried that

    var d = new Date("2011-09-14T03:42:09Z")
    emit(d.toTimeString(), null);

Results in "Invalid Date" key.

> ISO8601 parsing in view
> -----------------------
>
>                 Key: COUCHDB-1280
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1280
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: JavaScript View Server
>    Affects Versions: 1.0.2
>         Environment: All
>            Reporter: Knodi
>            Priority: Minor
>              Labels: ISO8601, date, datetime
>
> The current js view server doesn't parse Date format ISO8601. This is a widely used date format and date parse class should be made to parse ISO8601.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (COUCHDB-1280) ISO8601 parsing in view

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Joseph Davis resolved COUCHDB-1280.
----------------------------------------

    Resolution: Won't Fix

Really it should be can't fix. If the Date class can't parse this date format its a SpiderMonkey version issue and that should be upgraded to whatever. Even if we wanted to write our own date parsing function we couldn't automatically enable it on the Date object.

Bottom line, if its a real error, upgrade SpiderMonkey.

> ISO8601 parsing in view
> -----------------------
>
>                 Key: COUCHDB-1280
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1280
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: JavaScript View Server
>    Affects Versions: 1.0.2
>         Environment: All
>            Reporter: Knodi
>            Priority: Minor
>              Labels: ISO8601, date, datetime
>
> The current js view server doesn't parse Date format ISO8601. This is a widely used date format and date parse class should be made to parse ISO8601.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1280) ISO8601 parsing in view

Posted by "Knodi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104210#comment-13104210 ] 

Knodi commented on COUCHDB-1280:
--------------------------------

Also doing Date(doc.date).toTimeString() on invalid date only defaults to current time and doesn't parse the doc.date.

> ISO8601 parsing in view
> -----------------------
>
>                 Key: COUCHDB-1280
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1280
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: JavaScript View Server
>    Affects Versions: 1.0.2
>         Environment: All
>            Reporter: Knodi
>            Priority: Minor
>              Labels: ISO8601, date, datetime
>
> The current js view server doesn't parse Date format ISO8601. This is a widely used date format and date parse class should be made to parse ISO8601.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1280) ISO8601 parsing in view

Posted by "Knodi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104207#comment-13104207 ] 

Knodi commented on COUCHDB-1280:
--------------------------------

I tried

doc.date is 2011-08-20T05:53:44Z and emit(null, Date(doc.date).toTimeString()) is causing this error  Log :: function raised exception (new TypeError("Date(doc.date).toTimeString is not a function", "", 3))

> ISO8601 parsing in view
> -----------------------
>
>                 Key: COUCHDB-1280
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1280
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: JavaScript View Server
>    Affects Versions: 1.0.2
>         Environment: All
>            Reporter: Knodi
>            Priority: Minor
>              Labels: ISO8601, date, datetime
>
> The current js view server doesn't parse Date format ISO8601. This is a widely used date format and date parse class should be made to parse ISO8601.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (COUCHDB-1280) ISO8601 parsing in view

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

Randall Leeds closed COUCHDB-1280.
----------------------------------


Paul beat me to it:

I believe the behavior you see has to do with SpiderMonkey and not CouchDB. I've tried with SpiderMonkey 1.8.5 and 1.8.0 (from xulrunner) and do not observe any problems. Perhaps you're using an older version. If you did not build CouchDB yourself or if you would like help checking your SpiderMonkey version and building a new CouchDB (you can stay on the 1.0.x series to be safe) against it, please follow up on the users mailing list or in IRC.

If you think my assessment is wrong, I apologize. Please just re-open the ticket.

> ISO8601 parsing in view
> -----------------------
>
>                 Key: COUCHDB-1280
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1280
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: JavaScript View Server
>    Affects Versions: 1.0.2
>         Environment: All
>            Reporter: Knodi
>            Priority: Minor
>              Labels: ISO8601, date, datetime
>
> The current js view server doesn't parse Date format ISO8601. This is a widely used date format and date parse class should be made to parse ISO8601.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1280) ISO8601 parsing in view

Posted by "Knodi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104238#comment-13104238 ] 

Knodi commented on COUCHDB-1280:
--------------------------------

I'm using the couchdbx package for mac. I'll upgrade to couchdb single server package for mac.

> ISO8601 parsing in view
> -----------------------
>
>                 Key: COUCHDB-1280
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1280
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: JavaScript View Server
>    Affects Versions: 1.0.2
>         Environment: All
>            Reporter: Knodi
>            Priority: Minor
>              Labels: ISO8601, date, datetime
>
> The current js view server doesn't parse Date format ISO8601. This is a widely used date format and date parse class should be made to parse ISO8601.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira