Convert cron expressions into human readable descriptions
Overall
score
100%
Build a schedule description utility that converts cron expressions into human-readable descriptions in multiple languages, with an understanding of bundle size optimization.
Your utility should provide a main function that:
The implementation should demonstrate awareness of bundle size considerations when working with multiple language support.
en), French (fr), and Spanish (es)@generates
/**
* Formats a cron expression into a human-readable description in the specified language
* @param {string} cronExpression - The cron expression to describe (e.g., "0 9 * * *")
* @param {string} locale - The language code (e.g., 'en', 'fr', 'es')
* @returns {string} Human-readable description of the schedule
*/
function describeSchedule(cronExpression, locale) {
// IMPLEMENTATION HERE
}
module.exports = { describeSchedule };"0 9 * * *" in English returns a morning schedule description @test"0 9 * * *" in French returns a French morning schedule description @test"0 9 * * *" in Spanish returns a Spanish morning schedule description @test"*/15 * * * *" in English returns an interval description @testA JavaScript library for converting cron expressions into human-readable descriptions with internationalization support.
When implementing multi-language support:
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