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

Unified Diff: samples/total/client/Formats.dart

Issue 10538105: Make isUtc a getter, change some method names in Date. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 6 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
« no previous file with comments | « samples/total/client/DateTimeUtils.dart ('k') | samples/total/client/SpreadsheetPresenter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/total/client/Formats.dart
diff --git a/samples/total/client/Formats.dart b/samples/total/client/Formats.dart
index e161f766cca54598dbfb5abbaad652bff1022b94..bbc1e16739837ed2d40028abd6508e762646b2ad 100644
--- a/samples/total/client/Formats.dart
+++ b/samples/total/client/Formats.dart
@@ -224,18 +224,18 @@ class Formats {
_numericFormats.add(String _(double x) {
x -= x.floor(); // ignore days
Date dt = DateUtils.getDateTime(x);
- String hh = StringUtils.twoDigits(dt.hours);
- String mm = StringUtils.twoDigits(dt.minutes);
- String ss = StringUtils.twoDigits(dt.seconds);
+ String hh = StringUtils.twoDigits(dt.hour);
+ String mm = StringUtils.twoDigits(dt.minute);
+ String ss = StringUtils.twoDigits(dt.second);
return "${hh}:${mm}:${ss}";
});
_numericFormatDescriptions.add("HH:MM:SS (Time)"); // 12
_numericFormats.add(String _(double x) {
Date dt = DateUtils.getDateTime(x);
- String hh = StringUtils.twoDigits(dt.hours);
- String mm = StringUtils.twoDigits(dt.minutes);
- String ss = StringUtils.twoDigits(dt.seconds);
+ String hh = StringUtils.twoDigits(dt.hour);
+ String mm = StringUtils.twoDigits(dt.minute);
+ String ss = StringUtils.twoDigits(dt.second);
return "${dt.month}/${dt.day}/${dt.year} ${hh}:${mm}:${ss}";
});
_numericFormatDescriptions.add("MM/DD/YYYY HH:MM:SS"); // 13
@@ -244,9 +244,9 @@ class Formats {
double days = x.floor();
x -= days;
Date dt = DateUtils.getDateTime(x);
- String mm = StringUtils.twoDigits(dt.minutes);
- String ss = StringUtils.twoDigits(dt.seconds);
- return "${24 * days + dt.hours}:${mm}:${ss}";
+ String mm = StringUtils.twoDigits(dt.minute);
+ String ss = StringUtils.twoDigits(dt.second);
+ return "${24 * days + dt.hour}:${mm}:${ss}";
});
_numericFormatDescriptions.add("HH:MM:SS (Hours)"); // 14
« no previous file with comments | « samples/total/client/DateTimeUtils.dart ('k') | samples/total/client/SpreadsheetPresenter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698