Skip to content

Instantly share code, notes, and snippets.

@d6y
Created July 22, 2012 09:12
Show Gist options
  • Select an option

  • Save d6y/3158986 to your computer and use it in GitHub Desktop.

Select an option

Save d6y/3158986 to your computer and use it in GitHub Desktop.
tide
case class Tide(when:LocalTime, height:Metre) {
override val toString = when.toString("HH:mm") + " (" + height + ")"
def forZone(destZone:DateTimeZone) = Tide(
when.toDateTimeToday(DateTimeZone.forID("GMT")).withZone(destZone).toLocalTime(),
height)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment