Convert cron expressions into human readable descriptions
Overall
score
100%
A utility library that converts cron expressions into human-readable schedule descriptions with configurable time format support.
"30 14 * * *" with 24-hour format enabled, it returns "At 14:30" @test"30 14 * * *" with 12-hour format (24-hour disabled), it returns "At 02:30 PM" @test"0 0 * * *" with 24-hour format enabled, it returns "At 00:00" @test"0 0 * * *" with 12-hour format (24-hour disabled), it returns "At 12:00 AM" @test@generates
/**
* Converts a cron expression into a human-readable schedule description.
*
* @param {string} expression - The cron expression to convert.
* @param {Object} options - Configuration options.
* @param {boolean} options.use24HourTimeFormat - If true, uses 24-hour time format; if false, uses 12-hour format with AM/PM.
* @returns {string} A human-readable description of the schedule.
*/
function formatSchedule(expression, options) {
// IMPLEMENTATION HERE
}
module.exports = {
formatSchedule
};Provides cron expression to human-readable text conversion.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-cronstruedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10