Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.69 KB | None | 0 0
  1.   object date extends MappedDate(this) {
  2.     val year = Date.Today.getYear
  3.     val month = Date.Today.getMonth
  4.     val day = Date.Today.getDay
  5.     val y = SHtml.select((year - 1) to (year + 1) map (i => (i toString, i toString)),
  6.       Full(year.toString), {in: String => apply(Date(i_is_!, in.toInt, -1, -1).getDate)})
  7.     val m = SHtml.select(1 to 12 map (i => (i toString, i toString)),
  8.       Full(month.toString), {in: String => apply(Date(i_is_!, -1, in.toInt, -1).getDate)})
  9.     val d = SHtml.select(1 to 31 map (i => (i toString, i toString)),
  10.       Full(day.toString), {in: String => apply(Date(i_is_!, -1, -1, in.toInt).getDate)})
  11.     override def toForm = Full(<div>{y}{m}{d}</div>)
  12.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement