You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2012/03/15 20:36:24 UTC
[3/21] git commit: tweaks to contacts and tests
tweaks to contacts and tests
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/99731529
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/99731529
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/99731529
Branch: refs/heads/master
Commit: 9973152930f439fa86374e5090fa2549070db9e0
Parents: 27c3628
Author: Fil Maj <ma...@gmail.com>
Authored: Wed Mar 14 15:17:08 2012 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Thu Mar 15 10:18:36 2012 -0700
----------------------------------------------------------------------
lib/plugin/Contact.js | 34 ----------------------------------
1 files changed, 0 insertions(+), 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/99731529/lib/plugin/Contact.js
----------------------------------------------------------------------
diff --git a/lib/plugin/Contact.js b/lib/plugin/Contact.js
index ece43b1..bc39794 100644
--- a/lib/plugin/Contact.js
+++ b/lib/plugin/Contact.js
@@ -55,40 +55,6 @@ var Contact = function (id, displayName, name, nickname, phoneNumbers, emails, a
this.categories = categories || null; // ContactField[]
this.urls = urls || null; // ContactField[]
};
-/**
-* Converts Complex objects into primitives
-* Only conversion at present is for Dates.
-**/
-Contact.prototype.convertOut = function() {
- var value = this.birthday;
- if (value != null) {
- // try to make it a Date object if it is not already
- if (!value instanceof Date){
- try {
- value = new Date(value);
- } catch(exception){
- value = null;
- }
- }
- if (value instanceof Date){
- value = value.valueOf(); // convert to milliseconds
- }
- this.birthday = value;
- }
-};
-
-/**
-* Converts primitives into Complex Object
-* Currently only used for Date fields
-*/
-Contact.prototype.convertIn = function() {
- var value = this.birthday;
- try {
- this.birthday = new Date(parseFloat(value));
- } catch (exception){
- console.log("exception creating date");
- }
-};
/**
* Removes contact from device storage.