Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-7548

[BlackBerry10] dateToString format error

    Details

      Description

      Tested on Z10, trunk (2558)
      and iOS 7.1

      — Steps to Reproduce: —
      var date1 = new Date(01/01/01);

      function dateToStringSuccessCallback(date) {
      console.log("date: " + date.value);
      }
      function errorCallback(err) {
      console.log("ERROR: " + err.message);
      }

      navigator.globalization.dateToString(date1, dateToStringSuccessCallback, errorCallback,

      {formatLength:'full', selector:'date and time'}

      );

      When running the above date in iOS and BlackBerry results in a date of
      Wed Dec 31 1969 19:00:00 GMT-0500 (EST)

      But when executing the dateToString on the same value, results in two different values.

      — Actual Result: —
      on iOS you get:
      12/31/69, 7:00 PM

      on BlackBerry you will get:
      Date in wrong format!

        Activity

        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit c4e3eda7db65e3018c40fe103622e5b764139e02 in cordova-plugin-globalization's branch refs/heads/master from Lianghui Chen
        [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-globalization.git;h=c4e3eda ]

        CB-7548 [BlackBerry10] Allow any numeric type as date in dateToString method.

        Show
        jira-bot ASF subversion and git services added a comment - Commit c4e3eda7db65e3018c40fe103622e5b764139e02 in cordova-plugin-globalization's branch refs/heads/master from Lianghui Chen [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-globalization.git;h=c4e3eda ] CB-7548 [BlackBerry10] Allow any numeric type as date in dateToString method.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit d497d35c2361acd7b05b5950cc371625b23cad9d in cordova-plugin-globalization's branch refs/heads/master from Lianghui Chen
        [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-globalization.git;h=d497d35 ]

        CB-7548 [BlackBerry10] Re-implement getPreferredLanguage() and getLocaleName().

        Previous implementation of getPreferredLanguage() is using language info from default locale, which is wrong. The new implementation reflects the actual UI language selected, instead of the language for the default locale.

        Show
        jira-bot ASF subversion and git services added a comment - Commit d497d35c2361acd7b05b5950cc371625b23cad9d in cordova-plugin-globalization's branch refs/heads/master from Lianghui Chen [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-globalization.git;h=d497d35 ] CB-7548 [BlackBerry10] Re-implement getPreferredLanguage() and getLocaleName(). Previous implementation of getPreferredLanguage() is using language info from default locale, which is wrong. The new implementation reflects the actual UI language selected, instead of the language for the default locale.

          People

          • Assignee:
            bryanhiggins Bryan Higgins
            Reporter:
            bryanhiggins Bryan Higgins
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development