UNPKG

dayjs-tz-format

Version:

A Day.js plugin that combines timezone conversion and formatting

18 lines (15 loc) 371 B
'use strict'; var index = (function (o, c, d) { var proto = c.prototype; proto.tzFormat = function (format, timezone) { if (!d.utc) { throw new Error('UTC plugin is required'); } if (!d.tz) { throw new Error('Timezone plugin is required'); } var tz = timezone; return this.tz(tz).format(format); }; }); module.exports = index;