1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/helpers/gh-format-time-scheduled.js

18 lines
428 B
JavaScript

import {helper} from 'ember-helper';
export function timeToSchedule(params) {
if (!params || !params.length) {
return;
}
let [ , blogTimezone] = params;
let [time] = params;
if (blogTimezone.get('isFulfilled')) {
return moment.utc(time).tz(blogTimezone.get('content')).format('DD MMM YYYY, HH:mm');
}
}
export default helper(function (params) {
return timeToSchedule(params);
});