From 4af05568ada0fdb3306ebf512b717729ed782542 Mon Sep 17 00:00:00 2001 From: "Frank S. Thomas" Date: Wed, 31 Jan 2018 19:47:13 +0100 Subject: [PATCH] Removed deprecated `util.time` module (#425) * Removed deprecated `util.time` module * Add MiMa exclusions --- build.sbt | 4 ++- .../scala/eu/timepit/refined/util/time.scala | 31 ------------------- notes/0.9.0.markdown | 4 +++ 3 files changed, 7 insertions(+), 32 deletions(-) delete mode 100644 modules/core/shared/src/main/scala/eu/timepit/refined/util/time.scala diff --git a/build.sbt b/build.sbt index 24b7a0307..748d1e609 100644 --- a/build.sbt +++ b/build.sbt @@ -261,7 +261,9 @@ lazy val moduleJvmSettings = Def.settings( import com.typesafe.tools.mima.core._ Seq( ProblemFilters.exclude[ReversedMissingMethodProblem]( - "eu.timepit.refined.scalacheck.StringInstances.nonEmptyStringArbitrary") + "eu.timepit.refined.scalacheck.StringInstances.nonEmptyStringArbitrary"), + ProblemFilters.exclude[MissingClassProblem]("eu.timepit.refined.util.time$"), + ProblemFilters.exclude[MissingClassProblem]("eu.timepit.refined.util.time") ) } ) diff --git a/modules/core/shared/src/main/scala/eu/timepit/refined/util/time.scala b/modules/core/shared/src/main/scala/eu/timepit/refined/util/time.scala deleted file mode 100644 index f3149f357..000000000 --- a/modules/core/shared/src/main/scala/eu/timepit/refined/util/time.scala +++ /dev/null @@ -1,31 +0,0 @@ -package eu.timepit.refined.util - -import eu.timepit.refined.W -import eu.timepit.refined.api.Refined -import eu.timepit.refined.numeric.Interval - -/** Module for date and time related refined types. */ -@deprecated("`util.time` has been renamed `types.time`", "0.6.2") -object time { - - /** An `Int` in the range from 1 to 12 representing the month-of-year. */ - type Month = Int Refined Interval.Closed[W.`1`.T, W.`12`.T] - - /** - * An `Int` in the range from 1 to 31 representing the day-of-month. - * Note that the days from 29 to 31 are not valid for all months. - */ - type Day = Int Refined Interval.Closed[W.`1`.T, W.`31`.T] - - /** An `Int` in the range from 0 to 23 representing the hour-of-day. */ - type Hour = Int Refined Interval.Closed[W.`0`.T, W.`23`.T] - - /** An `Int` in the range from 0 to 59 representing the minute-of-hour. */ - type Minute = Int Refined Interval.Closed[W.`0`.T, W.`59`.T] - - /** An `Int` in the range from 0 to 59 representing the second-of-minute. */ - type Second = Int Refined Interval.Closed[W.`0`.T, W.`59`.T] - - /** An `Int` in the range from 0 to 999 representing the millisecond-of-second. */ - type Millis = Int Refined Interval.Closed[W.`0`.T, W.`999`.T] -} diff --git a/notes/0.9.0.markdown b/notes/0.9.0.markdown index e0fddf86b..d61051ee8 100644 --- a/notes/0.9.0.markdown +++ b/notes/0.9.0.markdown @@ -4,8 +4,12 @@ ### Changes +* Removed deprecated `util.time` module which has been replaced by + the `types.time` module. ([#425][#425]) + ### Bug fixes ### Updates [#415]: https://github.com/fthomas/refined/pull/415 +[#425]: https://github.com/fthomas/refined/pull/425