[ https://issues.apache.org/jira/browse/CB-8115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15222893#comment-15222893 ]
Colin Bau edited comment on CB-8115 at 4/2/16 1:47 PM: ------------------------------------------------------- hi [~daserge]] sorry for the lately reply after use your fork,problem almost solve but still have some little confuse actually for example my birthday︰1983-01-23 when I use "save" method to add a new member by this => contact.birthday = new Date(1983, 0, 23); OR contact.birthday = new Date("23 Jan 1983"); [Android case] I saw the member's birthday data become 1983-01-23,good! when I use "find" method to read the member data that I added,the birthday data show => Sun Jan 23 1983 00:00:00 GMT+800(CST),I think it is correct too but when I use "pickContact" method and find the member data that I I added,the json value birthday value is => 1983-01-22T16:00:00.00X,strange? [iOS case] I saw the member's birthday data become 1983-01-22,a little strange!(1 day less than expected) when I use "find" method to read that member data that I I added,the birthday data show => Sun Jan 23 1983 00:00:00 GMT+800(CST),I think it is correct too but when I use "pickContact" method and find the member data that I I added,the json value birthday value is => 1983-01-22T16:00:00.00X,strange? was (Author: bau720123): hi [~daserge]] sorry for the lately reply after use your fork,problem almost solve but still have some little confuse actually for example my birthday︰1983-01-23 when I use "save" method to add a new member by this => contact.birthday = new Date(1983, 0, 23); OR contact.birthday = new Date("23 Jan 1983"); Android case I saw the member's birthday data become 1983-01-23,good! when I use "find" method to read the member data that I added,the birthday data show => Sun Jan 23 1983 00:00:00 GMT+800(CST),I think it is correct too but when I use "pickContact" method and find the member data that I I added,the json value birthday value is => 1983-01-22T16:00:00.00X,strange? iOS case I saw the member's birthday data become 1983-01-22,a little strange!(1 day less than expected) when I use "find" method to read that member data that I I added,the birthday data show => Sun Jan 23 1983 00:00:00 GMT+800(CST),I think it is correct too but when I use "pickContact" method and find the member data that I I added,the json value birthday value is => 1983-01-22T16:00:00.00X,strange? > incorrect birthday saved to phonebook using Contacts Plugin > ----------------------------------------------------------- > > Key: CB-8115 > URL: https://issues.apache.org/jira/browse/CB-8115 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Contacts > Affects Versions: 4.0.0 > Environment: Android and IOS > Reporter: Kiran Jain > Assignee: Sergey Shakhnazarov > Priority: Minor > Labels: Android, IOS, birthday, reproduced, triaged > > We are facing an issue while trying to add birthday to Contact while using > Cordova for android while adding a new contact to the phonebook > following is part of the code > contact = navigator.contacts.create({ > "displayName": displayname > }); > // store contact name > var contactName = new ContactName(); > contactName.familyName = lastname; > contactName.givenName = firstname > contact.name = contactName; > contact.birthday = new Date("16 May 1984"); > // save the contact > contact.save(); > With above code, when data is viewed in android phone, the birthday is save > as 29-12-6731 instead of expected 16-May-1984 > we have tried all possible combinations of date entry viz: 16-May-1984 ; > 16/May/1984 ; 16/5/1984 ; new date(1984,05,16) > but all in vain the results are the same. > also need to know how to save anniversary date > when using this plugin for IOS, the date saved is 15-May-1984 (1 day less > than expected). -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org