Skip to content
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

Use .twitter() over a moment.js duration #7

Open
decklord opened this issue Jul 6, 2014 · 2 comments
Open

Use .twitter() over a moment.js duration #7

decklord opened this issue Jul 6, 2014 · 2 comments

Comments

@decklord
Copy link

decklord commented Jul 6, 2014

It would be awesome that the following code would work:

moment.duration(secondsInterval, 's').twitter()

I just have a seconds interval.

@hijonathan
Copy link
Owner

Great idea! Would you be interested in sending a PR? If not, I can try to get to it in the next couple of weekends.

In the meantime, a workaround would be to simply do something like this:

moment().subtract(secondsInterval, 's').twitter()

@hijonathan
Copy link
Owner

On second thought, doing it that way is probably a more elegant solution. What do you think?

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

No branches or pull requests

2 participants