Created
June 16, 2019 10:34
-
-
Save mohamedsaqer/4c42b2a9c52c62799caa56db91ca653d to your computer and use it in GitHub Desktop.
Difference in time react-native
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var msDiff = new Date(this.state.expire_date).getTime() - new Date().getTime(); //Future date - current date | |
var daysTill = Math.floor(msDiff / (1000 * 60 * 60 * 24)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment