Shindig
  1. Shindig
  2. SHINDIG-986

parsing date values into person.dateOfBirth

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.0
    • Component/s: Javascript , PHP
    • Labels:
      None

      Description

      When parsing json values in jsonperson.js date fields (currently dateofbirth only) are parsed the following way: value = new Date(jsonvalue); This requires the server to send values in a format parseable by Date.parse(). Unfortunately this does not handle values in ISO format (yyyy-mm-dd), what is used by php-shindig.

      Upon accessing person.getField(opensocial.Person.Field.DATE_OF_BIRTH) one gets an Invalid Date error.

        Activity

        Hide
        Nagy Attila added a comment -

        Attached proposed patch to alter jsonperson.js to parse iso formatted dates as well.

        I believe this is less error prone, and makes implementing the PersonService easier.

        Show
        Nagy Attila added a comment - Attached proposed patch to alter jsonperson.js to parse iso formatted dates as well. I believe this is less error prone, and makes implementing the PersonService easier.
        Hide
        Adam Winer added a comment -

        This was already implemented on trunk for SHINDIG-933. If you need a fix for the 1.0.0 branch, please merge in Subversion revision r754978.

        Show
        Adam Winer added a comment - This was already implemented on trunk for SHINDIG-933 . If you need a fix for the 1.0.0 branch, please merge in Subversion revision r754978.
        Hide
        Nagy Attila added a comment -

        Thanks, I have no commit access. Could someone please merge in that given revision? It looks like this bug breaks both java and php shindig.

        Show
        Nagy Attila added a comment - Thanks, I have no commit access. Could someone please merge in that given revision? It looks like this bug breaks both java and php shindig.
        Hide
        Paul Lindner added a comment -

        a more generic fix is already checked in

        Show
        Paul Lindner added a comment - a more generic fix is already checked in

          People

          • Assignee:
            Unassigned
            Reporter:
            Nagy Attila
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development