Fix bug 1342 #1348

Open
wants to merge 4 commits into
from

Projects

None yet

2 participants

@boppy
Contributor
boppy commented Feb 5, 2017

Fixing #1342 by adding suggested code by @leofeyer contao/core@094e809#diff-8d2a0620105360ee4698532805680d5d plus specs.

Specs/Types/Date.js
@@ -424,6 +424,9 @@ describe('Date', function(){
it('should return the minutes as two digits', function(){
expect(d.format('%M')).toEqual('02');
});
+ it('should return the month as one digit', function(){
+ expect(d.format('%n')).toEqual('11');
@leofeyer
leofeyer Feb 5, 2017

This test is not really suitable to test %n, is it? You should pick a month < 10 and make sure there is no leading 0.

@boppy
boppy Feb 5, 2017 Contributor

I should get some more coffee before my first commits on sundays... ;-)
Thx. Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment