From e9801e280bcd4f16b04b612e484dbfb4d5146ace Mon Sep 17 00:00:00 2001 From: David Rajchenbach-Teller Date: Sat, 18 Aug 2012 08:25:49 -0400 Subject: [PATCH] Bug 783284 - [OS.File] Rename *Time to *Date. r=froydnj --- toolkit/components/osfile/osfile_win_front.jsm | 18 +++++++++--------- .../tests/mochi/worker_test_osfile_front.js | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/toolkit/components/osfile/osfile_win_front.jsm b/toolkit/components/osfile/osfile_win_front.jsm index e6dc4f7c2382..da7ec7b77f3c 100644 --- a/toolkit/components/osfile/osfile_win_front.jsm +++ b/toolkit/components/osfile/osfile_win_front.jsm @@ -581,30 +581,30 @@ * The creation time of this file. * @type {Date} */ - get winCreationTime() { + get winCreationDate() { let date = FILETIME_to_Date(this._ftCreationTime); - delete this.winCreationTime; - Object.defineProperty(this, "winCreationTime", {value: date}); + delete this.winCreationDate; + Object.defineProperty(this, "winCreationDate", {value: date}); return date; }, /** * The last modification time of this file. * @type {Date} */ - get winLastWriteTime() { + get winLastWriteDate() { let date = FILETIME_to_Date(this._ftLastWriteTime); - delete this.winLastWriteTime; - Object.defineProperty(this, "winLastWriteTime", {value: date}); + delete this.winLastWriteDate; + Object.defineProperty(this, "winLastWriteDate", {value: date}); return date; }, /** * The last access time of this file. * @type {Date} */ - get winLastAccessTime() { + get winLastAccessDate() { let date = FILETIME_to_Date(this._ftLastAccessTime); - delete this.winLastAccessTime; - Object.defineProperty(this, "winLastAccessTime", {value: date}); + delete this.winLastAccessDate; + Object.defineProperty(this, "winLastAccessDate", {value: date}); return date; }, /** diff --git a/toolkit/components/osfile/tests/mochi/worker_test_osfile_front.js b/toolkit/components/osfile/tests/mochi/worker_test_osfile_front.js index d8df0533d385..dd5128460056 100644 --- a/toolkit/components/osfile/tests/mochi/worker_test_osfile_front.js +++ b/toolkit/components/osfile/tests/mochi/worker_test_osfile_front.js @@ -327,15 +327,15 @@ function test_iter_dir() if (OS.Win) { let year = new Date().getFullYear(); - let creation = entry.winCreationTime; + let creation = entry.winCreationDate; ok(creation, "test_iter_dir: Windows creation date exists: " + creation); ok(creation.getFullYear() >= year - 1 && creation.getFullYear() <= year, "test_iter_dir: consistent creation date"); - let lastWrite = entry.winLastWriteTime; + let lastWrite = entry.winLastWriteDate; ok(lastWrite, "test_iter_dir: Windows lastWrite date exists: " + lastWrite); ok(lastWrite.getFullYear() >= year - 1 && lastWrite.getFullYear() <= year, "test_iter_dir: consistent lastWrite date"); - let lastAccess = entry.winLastAccessTime; + let lastAccess = entry.winLastAccessDate; ok(lastAccess, "test_iter_dir: Windows lastAccess date exists: " + lastAccess); ok(lastAccess.getFullYear() >= year - 1 && lastAccess.getFullYear() <= year, "test_iter_dir: consistent lastAccess date"); }