File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -613,7 +613,7 @@ function dateFilter($locale) {
613
613
forEach ( parts , function ( value ) {
614
614
fn = DATE_FORMATS [ value ] ;
615
615
text += fn ? fn ( date , $locale . DATETIME_FORMATS , dateTimezoneOffset )
616
- : value . replace ( / ( ^ ' | ' $ ) / g, '' ) . replace ( / ' ' / g, "'" ) ;
616
+ : value === "''" ? "'" : value . replace ( / ( ^ ' | ' $ ) / g, '' ) . replace ( / ' ' / g, "'" ) ;
617
617
} ) ;
618
618
619
619
return text ;
Original file line number Diff line number Diff line change @@ -421,6 +421,8 @@ describe('filters', function() {
421
421
it ( 'should treat a sequence of two single quotes as a literal single quote' , function ( ) {
422
422
expect ( date ( midnight , "yyyy'de' 'a''dd' 'adZ' h=H:m:saZ" ) ) .
423
423
toEqual ( "2010de a'dd adZ 12=0:5:8AM-0500" ) ;
424
+ expect ( date ( midnight , "EEE, MMM d, ''yy" ) ) .
425
+ toEqual ( "Fri, Sep 3, '10" ) ;
424
426
} ) ;
425
427
426
428
it ( 'should accept default formats' , function ( ) {
You can’t perform that action at this time.
0 commit comments