How to use the utc function from moment
Find comprehensive JavaScript moment.utc code examples handpicked from public code repositorys.
116 117 118 119 120 121 122 123 124 125const amountInBaseUnit = BigNumber(transaction.value).div(1e6) let output = { amount: amountInBaseUnit.toString(10), fromAddress: transaction.from, toAddress: transaction.to, date: moment.utc(parseInt(transaction.expirationTime) * 1000).format(), transactionVersion: parseInt(transaction.version), explorerLink: `https://libexplorer.com/version/${transaction.version}` } // Mint
67 68 69 70 71 72 73 74 75 76async.eachSeries(docs, function(user, cb){ try{ // console.log('Processing', user._id); var plan = subscriptions.blocks[user.purchased.plan.planId]; var lastBillingDate = moment.utc(user.purchased.plan.lastBillingDate); if(!plan){ throw new Error('Plan ' + user.purchased.plan.planId + ' does not exists. User ' + user._id); }
+ 5 other calls in file
GitHub: davidmerfield/Blot
21 22 23 24 25 26 27 28 29 30var error_code = account.error_code; res.locals.account = req.account = account; if (last_sync) { res.locals.account.last_sync = moment.utc(last_sync).fromNow(); } if (error_code) { res.locals.account.folder_missing = error_code === 409;
+ 3 other calls in file
GitHub: davidmerfield/Blot
92 93 94 95 96 97 98 99 100draft: is_draft, metadata: metadata, size: stat.size, dependencies: dependencies, dateStamp: DateStamp(blog, path, metadata), updated: moment.utc(stat.mtime).valueOf(), }; if (entry.dateStamp === undefined) delete entry.dateStamp;
455 456 457 458 459 460 461 462 463 464 465children: 0, total_pending_payout_value: '0.000 HBD', total_payout_value: '0.000 HBD', pending_payout_value: '0.000 HBD', curator_payout_value: '0.000 HBD', cashout_time: moment.utc().add(7, 'days').toDate(), body: `@${field.creator} added ${field.name} (${field.locale})`, }); const getExposedFields = (objectType, fields) => {
150 151 152 153 154 155 156 157 158 159var is_schedule_order = request_data_body.is_schedule_order; var schedule_order_start_at = null; var schedule_order_start_at2 = null; if (is_schedule_order) { schedule_order_start_at = moment.utc(Number(request_data_body.order_start_at)).format(); if (request_data_body.order_start_at2) { schedule_order_start_at2 = moment.utc(Number(request_data_body.order_start_at2)).format(); } } else {
+ 11 other calls in file
GitHub: gino097/marketingNS
43 44 45 46 47 48 49 50 51 52const datoFecha2 = result["SOLICI_FEC_FIN"]; const datoFecha3 = result["SOLICI_FECMOD"]; const datoFecha4 = result["SOLICI_FECING"]; const fechaBolv1 = (moment.utc(datoFecha1).isValid() ? moment.utc(datoFecha1).format('DD/MM/YYYY') : '-----------------------'); const fechaBolv2 = (moment.utc(datoFecha2).isValid() ? moment.utc(datoFecha2).format('DD/MM/YYYY') : '-----------------------'); const fechaBolv3 = (moment.utc(datoFecha3).isValid() ? moment.utc(datoFecha3).format('DD/MM/YYYY') : '-----------------------'); const fechaBolv4 = (moment.utc(datoFecha4).isValid() ? moment.utc(datoFecha4).format('DD/MM/YYYY') : '-----------------------'); //FUENTE
+ 3 other calls in file
52 53 54 55 56 57 58 59 60 61disabledSince: { type: Date, }, lastAccess: { type: Date, default: moment.utc(), }, /** * valid user types: * guest -> a guest user
+ 4 other calls in file
12 13 14 15 16 17 18 19 20 21const status = suburbService.getSuburbStatus(newStatus); if (suburb && status) { const addStatus = await suburbService.suburbAddStatus(suburbId, { ...status, details, transtime: moment.utc(), }); if (addStatus) { if (status.status === "approved") { await userService.updateUser({
49 50 51 52 53 54 55 56 57 58 59 60} function getMaximum(punchArray) { const max = punchArray.reduce(function (prev, current) { const prev_moment = moment.utc(prev.punching_time, "HH:mm") const curr_moment = moment.utc(current.punching_time, "HH:mm") return prev_moment > curr_moment ? prev : current; }).punching_time;
+ 5 other calls in file
moment.utc is the most popular function in moment (43 examples)

