Skip to content

Commit 5d7e77d

Browse files
committed
Add hr label for hours in Duration.timeUnitLabels
1 parent 53cf6e3 commit 5d7e77d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/src/scala/concurrent/duration/Duration.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ object Duration {
3838
* Construct a finite duration from the given length and time unit, where the latter is
3939
* looked up in a list of string representation. Valid choices are:
4040
*
41-
* `d, day, h, hour, m, min, minute, s, sec, second, ms, milli, millisecond, µs, micro, microsecond, ns, nano, nanosecond`
41+
* `d, day, h, hr, hour, m, min, minute, s, sec, second, ms, milli, millisecond, µs, micro, microsecond, ns, nano, nanosecond`
4242
* and their pluralized forms (for every but the first mentioned form of each unit, i.e. no "ds", but "days").
4343
*/
4444
def apply(length: Long, unit: String): FiniteDuration = new FiniteDuration(length, Duration.timeUnit(unit))
@@ -79,7 +79,7 @@ object Duration {
7979
}
8080
private[this] val timeUnitLabels = List(
8181
DAYS -> "d day",
82-
HOURS -> "h hour",
82+
HOURS -> "h hr hour",
8383
MINUTES -> "m min minute",
8484
SECONDS -> "s sec second",
8585
MILLISECONDS -> "ms milli millisecond",

0 commit comments

Comments
 (0)