andrewplummer / Sugar

A Javascript library for working with native objects.
https://sugarjs.com/
MIT License
4.54k stars 305 forks source link

date.format('{yy}') rounds 2001 to 1 #521

Closed voxmatt closed 8 years ago

voxmatt commented 8 years ago

date.js line 36

'yy': function(d) {
      return callDateGet(d, 'FullYear') % 100;
},

results in 2001 -> 1 when '01' is the desired output

andrewplummer commented 8 years ago

Thanks for this! This one is a duplicate of #498. Sat on it for a while but it's fixed now and should go out soon!