@joshfarrant/shortcuts-js
Version:
An iOS 12 Shortcuts creator
23 lines • 959 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("../utils");
/**
* @action Get Time Between Dates
* @section Content Types > Calendar > Dates
* @icon Date
*
* Subtracts the specified date from the date passed into the action. For example, this action could get the number of minutes from now until a calendar event passed in as input.
*
* ```js
* getTimeBetweenDates({
* unit: 'Days',
* date: '3/5/2011 5:45pm',
* });
* ```
*/
const getTimeBetweenDates = ({ unit = 'Minutes', date = '', }) => ({
WFWorkflowActionIdentifier: 'is.workflow.actions.gettimebetweendates',
WFWorkflowActionParameters: Object.assign(Object.assign({}, (unit !== 'Minutes' && { WFTimeUntilUnit: unit })), (date !== '' && { WFTimeUntilReferenceDate: 'Other', WFTimeUntilCustomDate: date })),
});
exports.default = utils_1.withActionOutput(getTimeBetweenDates);
//# sourceMappingURL=getTimeBetweenDates.js.map