-
Notifications
You must be signed in to change notification settings - Fork 210
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
Feature/caption and title (#14) #870
Conversation
grasdk
commented
Mar 31, 2024
- reading caption and title from several tags with several tests
- added minor bugfix for date conversion to MS
- optimization: break sidecar loop, when first sidecar is found
* reading caption and title from several tags with several tests added minor bugfix for date conversion to MS optimization: break sidecar loop, when first sidecar is found
Ok. Once again I'm struck by dates. The error has nothing to do with this PR. The problem lies in these lines: When running the tests today, the 31st of march, the subtraction of months behaves weirdly. Javascript data handling is notoriously bad. Take a look here, how subtracting a month from the 31st of march (or 1st of april) suddenly becomes the 3rd of march:
So in javascript if you subtract a month and then add a month, you won't always arrive at the starting point. Especially around end of longer months. I will try and fix the tests. They time out when they run locally, so I have to commit and sync every time I think I have a solution. |
Ahh this search is annoying. I would just create a PR for the original feature. The code looks good to me so far. If metadata test runs, I will merge it. Then we can have a separate discussion or at least a bug about the date search. |
Ok. I think my solution to the search is more intuitive than the default js one. Basically it is:
Note, month can be negative, so you can add -1 month, as the search does: So 31st of march one month ago and 3 days back means, 27th, 28th and 29th of February this year. Of course, I can remove this easily from the PR if you would like that. Can do it tonight. :-) |
I reverted not only the tests but also the other search-mechanism described above. I will resubmit in another PR, so you can try it out separately :) Edit: today the tests run fine because it's the 1st of April ;) |
Thank you! |