add date on editor

This commit is contained in:
ammarahm-ed
2020-02-02 19:37:24 +05:00
parent 37eca89956
commit c74ff4de90

View File

@@ -295,6 +295,7 @@ const Editor = ({navigation, noMenu}) => {
}`; }`;
const timeConverter = timestamp => { const timeConverter = timestamp => {
if (!timestamp) return;
var d = new Date(timestamp), // Convert the passed timestamp to milliseconds var d = new Date(timestamp), // Convert the passed timestamp to milliseconds
yyyy = d.getFullYear(), yyyy = d.getFullYear(),
mm = ('0' + (d.getMonth() + 1)).slice(-2), // Months are zero based. Add leading 0. mm = ('0' + (d.getMonth() + 1)).slice(-2), // Months are zero based. Add leading 0.