-
Notifications
You must be signed in to change notification settings - Fork 50
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
Why use StringBuffer instead of StringBuilder? #212
Comments
@Sternbach-Software , This is a fair question and I will change it. The reason it uses StringBuffer is because the code dates back to 2004 before the Sept 2004 release of Java 5. At this point there is no reason not to change it. |
@Sternbach-Software, |
So |
Then again, what are the use cases? Maybe the most common use case is calculating a zman for a given time zone, wrapping it in a zman, and displaying it to the user. My implementation of Zman uses kotlinx.datetime.Instant which forces you to provide a timezone when you want to convert it to a LocalDateTime and when creating the Instant, but that would be the responsibility of the accessor of the Instant when they want to do that date math or conversion. Maybe it should be the same thing here? Provide them with the minimal necessary information that they couldn't easily get without rewriting the library, and let them use that to do what they need. Still not sure what use cases you intended this for. I use this to solve #217 . |
Fixed in via 8a643bc. |
zmanim/src/main/java/com/kosherjava/zmanim/util/Zman.java
Line 238 in d24323b
The javadoc for it says
The text was updated successfully, but these errors were encountered: