Closed SleeplessByte closed 8 years ago
Mm unfortunately this would place limitations on the date formats you could use when instantiating the calendar or entering dates but I could and will do better on not using new Date when I don't need to.
On second thought I think I'd like to limit the date input to that format for consistency's sake. https://github.com/Baremetrics/calendar/commit/22e0256e0b76d6f49085eb59ee1b20474ef29e55
You should probably limit to a format, not necc. that format, with regards to #26 #2
Opening this back up.. I didn't like my implementation. It works for me as is but if someone wants to knock it out that's fine by me.
I'll look into it :)
On Fri, 4 Sep 2015 13:45 Tyler van der Hoeven notifications@github.com wrote:
Opening this back up.. I didn't like my implementation. It works for me as is but if someone wants to knock it out that's fine by me.
— Reply to this email directly or view it on GitHub https://github.com/Baremetrics/calendar/issues/28#issuecomment-137803067 .
The whole point of moment is that it normalizes
new Date()
calls. Instead replace the calls withmoment()
. All operations should bemoment
operations.For example
new Date('January 1, 1900')
becomesmoment( [1900, 1, 1] )
ormoment( '1900-01-01', 'YYYY-MM-DD')
;