How to use the unix function from moment
Find comprehensive JavaScript moment.unix code examples handpicked from public code repositorys.
GitHub: Protected/rowboat
1037 1038 1039 1040 1041 1042 1043 1044 1045 1046
if (!group) return; let announcement = group.announcement; if (!announcement) return; if (now) now = moment.unix(now); else now = moment(); let emb = null, message = await this.getAnnouncementMessage(group.id, announcement.id); if (message && message.embeds[0]) {
2
3
2
+ 5 other calls in file
GitHub: TRX-0/Tron
28 29 30 31 32 33 34 35 36 37
} if (timeDiff > 0) { const m = await message.channel.send(`**Time until ${args.slice(1).join(' ')}:** ${humanizeDuration(timeDiff, {round: true})}`); client.CountdownModel.create({ unixTime: moment.unix(args[0]), messageID: m.id, channelID: m.channel.id, description: args.slice(1).join(' ') });
1
2
5
+ 3 other calls in file
64 65 66 67 68 69 70 71 72 73 74
exports.checkRenewal = async function () { const certs = await this.getCerts(); for (let key of Object.keys(certs)) { const cert = certs[key]; const oneMonth = moment.unix(cert.created).add(1, 'month'); if (!moment().isAfter(oneMonth)) { app.log('Renewing:', cert.domain, cert.email); } }
0
0
2
+ 7 other calls in file
moment.utc is the most popular function in moment (43 examples)