OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // 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 |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library shelf_static.util; | |
6 | |
7 DateTime toSecondResolution(DateTime dt) { | 5 DateTime toSecondResolution(DateTime dt) { |
8 if (dt.millisecond == 0) return dt; | 6 if (dt.millisecond == 0) return dt; |
9 return dt.subtract(new Duration(milliseconds: dt.millisecond)); | 7 return dt.subtract(new Duration(milliseconds: dt.millisecond)); |
10 } | 8 } |
OLD | NEW |