Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get undefined dates in February #11

Closed
bbkiwi opened this issue Feb 5, 2020 · 6 comments
Closed

Get undefined dates in February #11

bbkiwi opened this issue Feb 5, 2020 · 6 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@bbkiwi
Copy link

bbkiwi commented Feb 5, 2020

Nice code. Using a cut down version in a ESP8266 project. Noted that not working
for the month of February. It is because is spelled wrong.
In dist/simplepicker.js
e.exports={monthTracker:n,months:["January","Febuary",
should be
e.exports={monthTracker:n,months:["January","February",

@priyank-p priyank-p added bug Something isn't working good first issue Good for newcomers labels Feb 5, 2020
@priyank-p
Copy link
Owner

@bbkiwi Thanks for the report! That indeed seems to be a typo. I am curious to know what breaks because of this typo. I tried this on Chrome and it works just fine so I guess a browser compatibility issue.

Either way, I will try to get a release out with a fix today.

@priyank-p
Copy link
Owner

Also, what do you mean by the "cut down version in a ESP8266 project"?

@priyank-p
Copy link
Owner

This fix is published to npm as v2.0.1. Thanks, @bbkiwi for the bug report.

@bbkiwi
Copy link
Author

bbkiwi commented Feb 7, 2020

Hi Priyank, I responded via email to the above, but I don't think it's gone thru, so I'll put comments here again.

With the spelling error, it works on my ipad (safari) except February is spelled incorrectly. However in FF 72.0.2 (64bit) it opens correctly but when the day is changed see screen shot.

openinFF
changedayFF

The ESP8266 project serves up files here:
https://github.com/bbkiwi/LEDClock/tree/useMulti/data

I'm not very familiar with JavaScript and npm. So I just grabbed the files from dist in your repo.
I don't understand completely how you build everything. The new commit changes lib/date-util.ts
but files in dist have also been changed, but dont show up in the diff.

Cheers, Bill

@priyank-p
Copy link
Owner

Hello Bill, the reason the change does not show in the diff is that I update the dist folder during a new release. If you check master the dist should have the correct spelling. See 71d7dc8.

The build process is simple. First, we compile typescript to javascript. We use typescript because it provides type checking. Next, we run it through babel to ensure somewhat older browsers can handle new features that are being used. Lastly, it is minified so it takes up fewer bytes!

The build tool we use is Webpack which is pretty common to build the frontend assets.

@priyank-p
Copy link
Owner

In the GitHub project you listed, here is the link showing the correct month in the dist folder: https://github.com/bbkiwi/LEDClock/blob/useMulti/data/dist/simplepicker.js#L116, which means it should work fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants