blob: 0476e0d6c5fd0113ac150149a7c274949dcfdff9 [file] [log] [blame]
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart = 2.9
/// @assertion final int millisecond
/// Returns the millisecond into the second 0...999.
/// @description Creates a new DateTime with various integer milliseconds values (0..999),
/// and reads the value back.
/// @author hlodvig
/// @reviewer msyabro
import "../../../Utils/expect.dart";
main() {
for(int i = 999; i >= 0; --i){
check(i);
}
}
void check(int ms) {
DateTime date = new DateTime(2011, 1, 1, 0, 0, 0, ms);
Expect.isTrue(date.millisecond is int);
Expect.equals(ms, date.millisecond);
}