Created
April 1, 2017 20:16
-
-
Save OkancanCosar/8a3e82ed531275142a15be3aa83a0955 to your computer and use it in GitHub Desktop.
React Native MomentJs fromNow()
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
$ npm install moment --save | |
----- | |
import moment from "moment"; | |
import tr from "moment/locale/tr"; | |
moment.locale("tr", tr); | |
.... | |
<Text style={styles.welcome}> | |
{ moment(TIMESTAMP * 1000).fromNow() } // 30 dakika önce | |
</Text> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment