Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: utils/archive/entry.dart

Issue 11770004: Rename Date to DateTime. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: utils/archive/entry.dart
diff --git a/utils/archive/entry.dart b/utils/archive/entry.dart
index 5d4381b6878498c25bde56ffae8fbd322927ffab..ec3ed87fea0dff29dadc1c1b583741b76c83f6c2 100644
--- a/utils/archive/entry.dart
+++ b/utils/archive/entry.dart
@@ -171,23 +171,23 @@ class ArchiveEntry {
set rdevminor(int value) => _set(SET_RDEVMINOR, 24, value);
/** The last time this entry was accessed, or null if it's unset. */
- Date get atime => _fromMs(_properties[25]);
- set atime(Date value) => _set(SET_ATIME, 25, _toMs(value));
+ DateTime get atime => _fromMs(_properties[25]);
+ set atime(DateTime value) => _set(SET_ATIME, 25, _toMs(value));
/** The time this entry was created, or null if it's unset. */
- Date get birthtime => _fromMs(_properties[26]);
- set birthtime(Date value) => _set(SET_BIRTHTIME, 26, _toMs(value));
+ DateTime get birthtime => _fromMs(_properties[26]);
+ set birthtime(DateTime value) => _set(SET_BIRTHTIME, 26, _toMs(value));
/**
* The last time an inode property of this entry was changed, or null if it's
* unset.
*/
- Date get ctime => _fromMs(_properties[27]);
- set ctime(Date value) => _set(SET_CTIME, 27, _toMs(value));
+ DateTime get ctime => _fromMs(_properties[27]);
+ set ctime(DateTime value) => _set(SET_CTIME, 27, _toMs(value));
/** The last time this entry was modified, or null if it's unset. */
- Date get mtime => _fromMs(_properties[28]);
- set mtime(Date value) => _set(SET_MTIME, 28, _toMs(value));
+ DateTime get mtime => _fromMs(_properties[28]);
+ set mtime(DateTime value) => _set(SET_MTIME, 28, _toMs(value));
/** Whether [openInputStream] has been called. */
bool get isInputOpen => _input != null;
@@ -231,18 +231,18 @@ class ArchiveEntry {
/**
* Converts [ms], the (possibly null) number of milliseconds since the epoch
- * into a Date object (which may also be null).
+ * into a DateTime object (which may also be null).
*/
- Date _fromMs(int ms) {
+ DateTime _fromMs(int ms) {
if (ms == null) return null;
- return new Date.fromMillisecondsSinceEpoch(ms);
+ return new DateTime.fromMillisecondsSinceEpoch(ms);
}
/**
* Converts [date], which may be null, into the number of milliseconds since
* the epoch (which may also be null).
*/
- int _toMs(Date date) {
+ int _toMs(DateTime date) {
if (date == null) return null;
return date.millisecondsSinceEpoch;
}

Powered by Google App Engine
This is Rietveld 408576698