cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-8115) incorrect birthday saved to phonebook using Contacts Plugin
Date Thu, 03 Dec 2015 08:20:11 GMT


ASF GitHub Bot commented on CB-8115:

Github user vladimir-kotikov commented on the pull request:
    @dblotsky, as @purplecabbage mentioned, there is no way to cover this by autotests, because
from JS perspective everything works well - we convert a date to timestamp and send it to
native, then we get _exactly the same_ timestamp from native (because there was no conversion
made on native side).
    BTW, this might be a perfect case to cover with UI autotest, @alsorokin working on.
    @riknoll, The issue is in format which the date should be stored in contacts database.
The android docs doesn't specify this format (except from the fact that [it should be a 'TEXT'](,
but the birthday in contact card is _displayed correctly_ only if specified as `dd-mm-YYYY`
(from my experience).
    There is no inconsistence in Contact objects structure on JS side - the `birthday` field
is always a valid `Date` object or `null`, despite of current platform.

> incorrect birthday saved to phonebook using Contacts Plugin
> -----------------------------------------------------------
>                 Key: CB-8115
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Contacts
>    Affects Versions: 4.0.0
>         Environment: Android and IOS
>            Reporter: Kiran Jain
>            Assignee: Vladimir Kotikov
>            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
> = contactName;
> contact.birthday = new Date("16 May 1984");
> // save the contact
> 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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message