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

How can I compare dates in react-moment? #109

Open
pedroRelvas opened this issue Dec 16, 2019 · 0 comments
Open

How can I compare dates in react-moment? #109

pedroRelvas opened this issue Dec 16, 2019 · 0 comments

Comments

@pedroRelvas
Copy link

In Moment.js I can compare dates just like this:

moment('2010-10-20').isAfter('2010-01-01', 'year');
But in react-moment I just can't find anything about the method `.isAfter. I want to compare the following values:

<TableCell>{ <Moment format="DD.MM.YYYY HH:mm">{row.nextIntervention}</Moment> isAfter <Moment format="DD.MM.YYYY HH:mm" /> ? <Moment format="DD.MM.YYYY">{row.nextIntervention.toString()}</Moment> : "heyhey"} </TableCell>
So as you can see, this code doesn't work (of course). Do you know anything that can hel me solve this?

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

1 participant