| Index: frog/leg/lib/date_helper.dart
|
| diff --git a/frog/leg/lib/date_helper.dart b/frog/leg/lib/date_helper.dart
|
| index 9c19ac66ac2a579df578a3155b076de40a243f11..630d8fc3414ee08086b7a8db30c066d0768b6f38 100644
|
| --- a/frog/leg/lib/date_helper.dart
|
| +++ b/frog/leg/lib/date_helper.dart
|
| @@ -2,6 +2,15 @@
|
| // 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.
|
|
|
| +String fourDigits(int n) {
|
| + int absN = n.abs();
|
| + String sign = n < 0 ? "-" : "";
|
| + if (absN >= 1000) return "$n";
|
| + if (absN >= 100) return "${sign}0$absN";
|
| + if (absN >= 10) return "${sign}00$absN";
|
| + if (absN >= 1) return "${sign}000$absN";
|
| +}
|
| +
|
| String threeDigits(int n) {
|
| if (n >= 100) return "${n}";
|
| if (n > 10) return "0${n}";
|
|
|