-
Notifications
You must be signed in to change notification settings - Fork 15
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
Filling dates with zeroes, and some other difficulties #11
Comments
Hi, Thanks for the kind words. Your package looks interesting, and I hope this can be helpful to you. It seems that all of this stems from your item 1. But I'm not sure if filling with zeroes automatically would be the right thing to do. I tend to think that the user ought to do so explicitly, and that this error actually brought to your attention that that's necessary. If the fields were zeroed automatically, it could lead to assumptions and misunderstandings, which could lead to miscalculations, which would lead to other bug reports. :)
By the way, note that Does that help? Let me know what you think. Thanks. |
Sadly, it didn't go so well - pretty challenging, lots of debugging, and plenty of tests failing. Left them some feedback - alphapapa/ts.el#11
Thank you for your response. I've resorted to writing a helper function to work around it, and it seems like an acceptable solution to this issue. |
Hi, thanks a lot for making ts.el. After writing so much haphazard, ad hoc date and time conversion code for Chronometrist, I was delighted to discover this library, with a great interface for conversion, very similar to a library I was planning to write myself.
Sadly, when I got around to using it, I ran into some showstoppers -
(make-struct :year 2020 :month 1 :day 1)
does not create a value for:unix
. Which means I have to fill zeros for hours, minutes, and seconds.ts-update
on a timestamp twice results in "Wrong type argument: integerp, nil". e.g. if you use it on the argument of a function to prevent having to write(ts-update (make-ts ...))
in all call sites, you have to ensure it doesn't already have a:unix
value.ts-unix
, because of what I perceive as another quirk -It's possible I'm not using it as envisioned (I'm not very experienced with languages outside of Elisp, especially with their date/time APIs). I'd be happy to be corrected in my usage.
If these are indeed perceived as areas for improvement, hopefully they can help making it a more mature library.
The text was updated successfully, but these errors were encountered: