cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-7102) globalization
Date Fri, 11 Jul 2014 17:48:05 GMT

    [ https://issues.apache.org/jira/browse/CB-7102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14059081#comment-14059081
] 

ASF GitHub Bot commented on CB-7102:
------------------------------------

Github user zalun commented on the pull request:

    https://github.com/apache/cordova-plugin-globalization/pull/17#issuecomment-48761078
  
    @rodms10 I've been checking the plugin with this code:
    
    ```
            navigator.globalization.getLocaleName(
                function(lang) {
                  console.log('getLocaleName: ' + lang);
                }, 
                function() {alert('ERROR1')});
    
            navigator.globalization.getPreferredLanguage(
                function(lang) {
                  console.log('getPreferredLanguage: ' + lang.value);
                }, 
                function() {alert('ERROR2')});
    
            navigator.globalization.dateToString(new Date('2014-10-30'), 
                function(format) {
                  console.log('long, time and date: ' + format.value);
                },
                function() {alert('ERROR3')}, {formatLength: 'long', selector: 'time and date'});
    
            navigator.globalization.dateToString(new Date('2014-10-30'), 
                function(format) {
                  console.log('long, time: ' + format.value);
                },
                function() {alert('ERROR4')}, {formatLength: 'long', selector: 'time'});
    
            navigator.globalization.dateToString(new Date('2014-10-30'), 
                function(format) {
                  console.log('date: ' + format.value);
                },
                function() {alert('ERROR5')}, {selector: 'date'});
    
            navigator.globalization.dateToString(new Date('2014-10-30'), 
                function(format) {
                  console.log('standard: ' + format.value);
                },
                function() {alert('ERROR6')});
    
            navigator.globalization.stringToDate('2011-10-10T14:48:00', 
                function(date) {
                  console.log('stringToDate', date);
                },
                function() {alert('ERROR7')}, {'selector': 'time and date'});
    
            navigator.globalization.getFirstDayOfWeek(
                function(day) {
                  console.log('first day of week', day.value);
                },
                function() {alert('ERROR8')});
    
            navigator.globalization.getDateNames(
                function(names) {
                  console.log('date names', names.value);
                },
                function() {alert('ERROR9')}, {'item': 'months', 'type': 'genitive'});
    
            navigator.globalization.isDayLightSavingsTime(new Date('2014-01-01'),
                function(isIt) {
                  console.log('is 1 Jan DST?', isIt.dst);
                },
                function() {alert('ERROR10')});
    ```


> globalization
> -------------
>
>                 Key: CB-7102
>                 URL: https://issues.apache.org/jira/browse/CB-7102
>             Project: Apache Cordova
>          Issue Type: Sub-task
>          Components: FirefoxOS
>            Reporter: Piotr Zalewa
>            Assignee: Piotr Zalewa
>
> Add globalization support for Firefox OS



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message