Skip to content

Commit

Permalink
Compile %c last, could also contain %X and %x
Browse files Browse the repository at this point in the history
  • Loading branch information
mdom committed Aug 7, 2018
1 parent ed40f27 commit de6d9ea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/App/dategrep/Strptime.pm
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,12 @@ sub build_patterns {
$patterns{R} = compile('%H:%M');
$patterns{T} = compile('%H:%M:%S');

## These must be the last patterns added, as all other specifiers could be used
$patterns{c} = compile( langinfo( D_T_FMT() ) );
## These must be the last patterns added, as all other specifiers could be used
$patterns{x} = compile( langinfo( D_FMT() ) );
$patterns{X} = compile( langinfo( T_FMT() ) );

## This must *really* be the last pattern
$patterns{c} = compile( langinfo( D_T_FMT() ) );
}

## TODO prefer past
Expand Down

0 comments on commit de6d9ea

Please sign in to comment.