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

Unified Diff: runtime/lib/date_patch.dart

Issue 11748016: Make ~/, round, ceil, floor, truncate return ints. Remove toInt. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Checked mode fixes. Created 7 years, 12 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: runtime/lib/date_patch.dart
diff --git a/runtime/lib/date_patch.dart b/runtime/lib/date_patch.dart
index 349245e7491c074d49280756c487e29e43b3f1a3..99d30983d356757a6b6b398e7049c0682f3e166f 100644
--- a/runtime/lib/date_patch.dart
+++ b/runtime/lib/date_patch.dart
@@ -183,7 +183,7 @@ patch class _DateImpl {
// Simplify calculations by working with zero-based month.
--month;
// Deal with under and overflow.
- year += (month / 12).floor().toInt();
+ year += (month / 12).floor();
month = month % 12;
// First compute the seconds in UTC, independent of the [isUtc] flag. If

Powered by Google App Engine
This is Rietveld 408576698