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

Unified Diff: runtime/lib/date_patch.dart

Issue 12317107: ceil/floor/truncate/round return integers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload due to error3 Created 7 years, 9 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 | « pkg/intl/lib/src/date_format_field.dart ('k') | runtime/lib/double.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/date_patch.dart
diff --git a/runtime/lib/date_patch.dart b/runtime/lib/date_patch.dart
index 750b60d928149cf45ca127c6f02ea92f05a9caf3..b83e96bb77759de62a6ffa9efeac9ff1de100d22 100644
--- a/runtime/lib/date_patch.dart
+++ b/runtime/lib/date_patch.dart
@@ -183,7 +183,7 @@ patch class DateTime {
// 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
« no previous file with comments | « pkg/intl/lib/src/date_format_field.dart ('k') | runtime/lib/double.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698