calendar.js icon indicating copy to clipboard operation
calendar.js copied to clipboard

Why is an exception thrown for dates < 1970?

Open darrendahl opened this issue 9 years ago • 2 comments

I understand the timestamps for pre epoch (Jan 1, 1970) dates are negative numbers, but I believe there should still be a way to handle these dates. What is the reason you chose to limit dates to be only >= 1970?

darrendahl avatar Feb 13 '17 21:02 darrendahl

@darrendahl Please send a pull request with the changes you propose to support dates farther back. Besides the actual implementation, the pull request should specify what is the earliest date supported and include tests and error checking enforcing the valid date ranges.

ramalho avatar Mar 22 '17 01:03 ramalho

This might be helpful for you @darrendahl since it doesn't look like a PR is going to be made any time soon haha.

I recently created a similar project that generates a calendar given a month and a year or a date. Maybe it'll help solve your use case for such a library? https://github.com/rantrix/calendator

rantrix avatar Jun 03 '17 00:06 rantrix