Convert cron expressions into human readable descriptions
Overall
score
100%
Build a schedule translation tool that converts cron expressions into human-readable descriptions in multiple languages.
Create a function that displays cron schedules in different languages, supporting at least three languages: English, French, and Spanish.
"*/15 * * * *" in English returns "Every 15 minutes" @test"*/15 * * * *" in French returns "Toutes les 15 minutes" @test"*/15 * * * *" in Spanish returns "Cada 15 minutos" @test"0 9 * * MON-FRI" in German returns "Um 09:00, Montag bis Freitag" @testCreate a function that translates multiple cron expressions into a target language at once.
["0 0 * * *", "*/30 * * * *", "0 12 * * SUN"] to French, returning an array of three French descriptions @testCreate a function that checks if a given language code is supported.
@generates
/**
* Translates a cron expression to a human-readable description in the specified language
* @param {string} cronExpression - The cron expression to translate
* @param {string} languageCode - The target language code (e.g., "en", "fr", "es", "de")
* @returns {string} Human-readable description in the target language
*/
export function translateSchedule(cronExpression, languageCode);
/**
* Translates multiple cron expressions to a target language
* @param {string[]} cronExpressions - Array of cron expressions
* @param {string} languageCode - The target language code
* @returns {string[]} Array of human-readable descriptions in the target language
*/
export function translateScheduleBatch(cronExpressions, languageCode);
/**
* Checks if a language code is supported
* @param {string} languageCode - The language code to check
* @returns {boolean} True if the language is supported, false otherwise
*/
export function isSupportedLanguage(languageCode);Provides cron expression parsing and internationalization support.
@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