Skip to content

Fix/today-at #127

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

Merged
merged 2 commits into from
Dec 21, 2021
Merged

Fix/today-at #127

merged 2 commits into from
Dec 21, 2021

Conversation

Mwexim
Copy link
Owner

@Mwexim Mwexim commented Dec 9, 2021

This pull request fixes #125 and aims to make the usage of timezones in general easier by migrating the ZONE_ID field to a TimeZone instance.

Copy link
Contributor

@WeeskyBDW WeeskyBDW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good to me.

public class SkriptDate implements Comparable<SkriptDate> {
// TODO make a config for this
public final static String DATE_FORMAT = "EEEE dd MMMM yyyy HH:mm:ss.SSS zzzXXX";
public final static Locale DATE_LOCALE = Locale.US;
@SuppressWarnings("FieldMayBeFinal")
private static ZoneId ZONE_ID = ZoneId.systemDefault();
private static TimeZone TIME_ZONE = TimeZone.getDefault();

This comment was marked as off-topic.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because then people would be able to change it without any good explanation. There is a public method that returns this field already. Reflection being the requirement means that it normally shouldn't be changed.

Copy link
Contributor

@WeeskyBDW WeeskyBDW Dec 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mea culpa i based this comment on the fact that millis in hours field is public but isn't a big problem if user change it

WeeskyBDW
WeeskyBDW previously approved these changes Dec 9, 2021
@Mwexim Mwexim merged commit b539c1c into master Dec 21, 2021
@Mwexim Mwexim deleted the fix/today-at-fix branch December 21, 2021 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test of expression "Today at" fail
2 participants