Skip to content

Added Time From Now Function To DateUtils#76

Merged
oilywithraybans merged 3 commits intodevfrom
feature/time-from-now
Oct 24, 2019
Merged

Added Time From Now Function To DateUtils#76
oilywithraybans merged 3 commits intodevfrom
feature/time-from-now

Conversation

@oilywithraybans
Copy link
Copy Markdown

No description provided.

y,
yy,
},
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I imagine this actually mutates some state inside the global moment function/object definition? Are we okay with that? We've probably been doing it all along, so it's probably okay.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It does, but using Moment's fromNow function I am not sure how else to go about it. Do you have any ideas?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nah, not really. It seems we essentially want to customize this part of moment's locale settings. In the future, we might consider some research into how moment handles these locale settings and maybe find some way to set these locale settings once, and not every time our timeFromNow() function is called. But that doesn't have to block this PR.

@oilywithraybans oilywithraybans merged commit 0d5d6c6 into dev Oct 24, 2019
@groberts314 groberts314 deleted the feature/time-from-now branch October 25, 2019 12:47
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.

2 participants