tuned;
authorwenzelm
Fri Oct 07 21:46:42 2016 +0200 (2016-10-07)
changeset 64094629558a1ecf5
parent 64093 f09f377da49d
child 64095 1a6d37c31df9
tuned;
src/Pure/General/date.scala
src/Pure/Tools/build_log.scala
     1.1 --- a/src/Pure/General/date.scala	Fri Oct 07 21:19:15 2016 +0200
     1.2 +++ b/src/Pure/General/date.scala	Fri Oct 07 21:46:42 2016 +0200
     1.3 @@ -59,6 +59,10 @@
     1.4      def unapply(str: String): Option[Date] =
     1.5        try { Some(parse(str)) }
     1.6        catch { case _: DateTimeParseException => None }
     1.7 +    object Strict
     1.8 +    {
     1.9 +      def unapply(s: String): Some[Date] = Some(parse(s))
    1.10 +    }
    1.11    }
    1.12  
    1.13  
     2.1 --- a/src/Pure/Tools/build_log.scala	Fri Oct 07 21:19:15 2016 +0200
     2.2 +++ b/src/Pure/Tools/build_log.scala	Fri Oct 07 21:46:42 2016 +0200
     2.3 @@ -211,11 +211,6 @@
     2.4            case "EST" => "GMT+1"  // FIXME ??
     2.5            case a => a })))
     2.6  
     2.7 -    object Strict_Date
     2.8 -    {
     2.9 -      def unapply(s: String): Some[Date] = Some(Date_Format.parse(s))
    2.10 -    }
    2.11 -
    2.12      val Test_Start = new Regex("""^Start test(?: for .+)? at ([^,]+), (.*)$""")
    2.13      val Test_Start_Old = new Regex("""^Start test(?: for .+)? at ([^,]+)$""")
    2.14      val Test_End = new Regex("""^End test on (.+), .+, elapsed time:.*$""")
    2.15 @@ -230,7 +225,7 @@
    2.16        val start_date = Field.build_start -> start.toString
    2.17        val end_date =
    2.18          log_file.lines.last match {
    2.19 -          case AFP.Test_End(AFP.Strict_Date(end_date)) =>
    2.20 +          case AFP.Test_End(AFP.Date_Format.Strict(end_date)) =>
    2.21              List(Field.build_end -> end_date.toString)
    2.22            case _ => Nil
    2.23          }
    2.24 @@ -249,9 +244,9 @@
    2.25      }
    2.26  
    2.27      log_file.lines match {
    2.28 -      case AFP.Test_Start(AFP.Strict_Date(start_date), hostname) :: _ =>
    2.29 +      case AFP.Test_Start(AFP.Date_Format.Strict(start_date), hostname) :: _ =>
    2.30          parse_afp(start_date, hostname)
    2.31 -      case AFP.Test_Start_Old(AFP.Strict_Date(start_date)) :: _ =>
    2.32 +      case AFP.Test_Start_Old(AFP.Date_Format.Strict(start_date)) :: _ =>
    2.33          parse_afp(start_date, "")
    2.34        case _ => log_file.err("cannot detect log header format")
    2.35      }