diff options
author | Matěj Cepl <mcepl@redhat.com> | 2011-06-04 02:30:57 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2011-06-05 14:53:48 +0200 |
commit | ffa6d74ddbf28c7fb7be1ad473847807d0301eac (patch) | |
tree | d10ac4afcfeb053567db51462e9695badab875ee /data/lib/bugzillaDOMFunctions.js | |
parent | 7509c91794f93a5b4445239429c2b918f771b543 (diff) | |
download | bugzilla-triage-ffa6d74ddbf28c7fb7be1ad473847807d0301eac.tar.gz |
Moving ahead ... storing the progress for future.
Diffstat (limited to 'data/lib/bugzillaDOMFunctions.js')
-rw-r--r-- | data/lib/bugzillaDOMFunctions.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/data/lib/bugzillaDOMFunctions.js b/data/lib/bugzillaDOMFunctions.js index 8f74288..49afef5 100644 --- a/data/lib/bugzillaDOMFunctions.js +++ b/data/lib/bugzillaDOMFunctions.js @@ -456,3 +456,23 @@ function getBugzillaName(URLhostname, bzLabelNames) { } return bugzillaID; } + +/** + * + * original 2011-03-30 15:49:27 EDT + */ +function parseBZCommentDate(dateString) { + var tZone = { + "EDT": 4, + "EST": 5 + }; + + var dateArr = dateString.trim().split(/\s+/); + var timeZoneOffset = tZone[dateArr[2]] - + ((new Date()).getTimezoneOffset())/60; + var dArr = dateArr[0].split("-"); + var tArr = dateArr[1].split(":"); + var dayObj = new Date(+dArr[0],+dArr[1]-1,+dArr[2], + +tArr[0]+timeZoneOffset,+tArr[1],+tArr[2],0); + return dayObj; +}; |