将cron表达式转换成好的描述字符串?有没有JAVA和Objective-C的库? [英] Convert cron expression into nice description strings? Is there a library for JAVA and Objective-C?
本文介绍了将cron表达式转换成好的描述字符串?有没有JAVA和Objective-C的库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在寻找一个转换 cron表达式像 45 17 7 6 * *
into 每年6月7日17:45 解析器应该是可调整到其他语言。德语为第一步。
I am looking for a parser that converts a cron expression like 45 17 7 6 * *
into Every year, on June 7th at 17:45 The parser should be adjustable to other languages. German for the first step.
是否有图书馆
- JAVA基于Android的项目
- 基于Objective-C的Iphone项目。
请参阅此处为usecase。
See here for the usecase.
推荐答案
cronTrigger.getExpressionSummary()
示例:
CronTrigger t = new CronTrigger();
t.setCronExpression("0 30 10-13 ? * WED,FRI");
System.out.println(""+t.getExpressionSummary());
输出:
seconds: 0
minutes: 30
hours: 10,11,12,13
daysOfMonth: ?
months: *
daysOfWeek: 4,6
lastdayOfWeek: false
nearestWeekday: false
NthDayOfWeek: 0
lastdayOfMonth: false
years: *
- Api Java Doc
- Api Java Doc
这篇关于将cron表达式转换成好的描述字符串?有没有JAVA和Objective-C的库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文