Project

General

Profile

Actions

Bug #3948

closed

WTimeEdit regexp for "mm" is incorrect

Added by Patrick Oppenlander almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Benoit Daccache
Target version:
Start date:
04/03/2015
Due date:
% Done:

0%

Estimated time:

Description

The leading zero for minutes should not be optional.

The following patch fixes the bug.

diff --git a/src/Wt/WTime.C b/src/Wt/WTime.C
index 9b0fdd8..b8844a8 100644
--- a/src/Wt/WTime.C
+++ b/src/Wt/WTime.C
@@ -536,7 +536,7 @@ WTime::RegExpInfo WTime::formatMinuteToRegExp(WTime::RegExpInfo& result,
   if (sf == "m") /* Minutes without leading 0 */
     result.regexp += "(0|[1-5]?[0-9])";
   else /* Minutes with leading 0 */
-    result.regexp += "([0-5]?[0-9])";
+    result.regexp += "([0-5][0-9])";

   return result;
 }
Actions #1

Updated by Koen Deforche almost 9 years ago

  • Status changed from New to InProgress
  • Assignee set to Benoit Daccache
Actions #2

Updated by Benoit Daccache almost 9 years ago

  • Status changed from InProgress to Resolved
Actions #3

Updated by Benoit Daccache almost 9 years ago

Fixed also for seconds + Fixed in JWT

Actions #4

Updated by Patrick Oppenlander almost 9 years ago

I've just updated my git tree and this patch doesn't appear to be in there yet?

Actions #5

Updated by Benoit Daccache almost 9 years ago

It has been pushed in the private git, It will be normally pushed to the public git in the following hours.

Benoit

Actions #6

Updated by Koen Deforche over 8 years ago

  • Status changed from Resolved to Closed
Actions #7

Updated by Koen Deforche over 8 years ago

  • Target version set to 3.3.5
Actions

Also available in: Atom PDF