thekingsimo / jquery-week-calendar

Automatically exported from code.google.com/p/jquery-week-calendar
0 stars 0 forks source link

Time formatting can result in incorrect padding for months #50

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

V1.2.0

The _formatDate function can incorrectly pad months when using the "m"
option. e.g. a date in October will produce "010" rather than "10".

I think that:
m: function(date) { return (date.getMonth() < 11 ? '0' : '') +
(date.getMonth() + 1); },

should read:
m: function(date) { return (date.getMonth() < 9 ? '0' : '') +
(date.getMonth() + 1); },

cheers,

Mark

Original issue reported on code.google.com by msharr...@gmail.com on 22 Jul 2009 at 4:01

GoogleCodeExporter commented 8 years ago

Original comment by robmo...@gmail.com on 10 Aug 2009 at 12:10

GoogleCodeExporter commented 8 years ago

Original comment by robmo...@gmail.com on 10 Aug 2009 at 10:12

GoogleCodeExporter commented 8 years ago

Original comment by robmo...@gmail.com on 10 Aug 2009 at 10:36