All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scalax.range.date.LocalDateStepper.scala Maven / Gradle / Ivy

The newest version!
package scalax.range.date

import java.time.LocalDate
import java.{time => jt}

import scalax.range.Stepper

import scala.concurrent.duration._


private[range] class LocalDateStepper[S](toDays: S => Long) extends Stepper[jt.LocalDate, S] {

  def plus(t: jt.LocalDate, s: S): jt.LocalDate = t.plusDays(toDays(s))
}

private[range] object LocalDateStepper extends DaysStepper[jt.LocalDate](_.days) {

  override def newStepper[S](toSubj: S => Long): Stepper[LocalDate, S] = new LocalDateStepper(toSubj)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy