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

Side by Side Diff: dart/samples/ui_lib/util/DateUtils.dart

Issue 11233061: Revert "Parts must start with 'part of'" and "Attempt to fix VM build" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 part of utilslib;
2
3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
4 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
5 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
6 4
7 /** 5 /**
8 * General purpose date/time utilities. 6 * General purpose date/time utilities.
9 */ 7 */
10 class DateUtils { 8 class DateUtils {
11 // TODO(jmesserly): localized strings 9 // TODO(jmesserly): localized strings
12 static const WEEKDAYS = const ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 10 static const WEEKDAYS = const ['Monday', 'Tuesday', 'Wednesday', 'Thursday',
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 176 }
179 String twoDigits(int n) { 177 String twoDigits(int n) {
180 if (n >= 10) return "${n}"; 178 if (n >= 10) return "${n}";
181 return "0${n}"; 179 return "0${n}";
182 } 180 }
183 String mm = 181 String mm =
184 twoDigits(duration.inMinutes.remainder(Duration.MINUTES_PER_HOUR)); 182 twoDigits(duration.inMinutes.remainder(Duration.MINUTES_PER_HOUR));
185 return "${hours}:${mm} ${a}"; 183 return "${hours}:${mm} ${a}";
186 } 184 }
187 } 185 }
OLDNEW
« no previous file with comments | « dart/samples/ui_lib/util/CollectionUtils.dart ('k') | dart/samples/ui_lib/util/StringUtils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698