All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jchanghong.cron.pattern.parser.DayOfMonthValueParser Maven / Gradle / Ivy

The newest version!
package com.jchanghong.cron.pattern.parser;

import com.jchanghong.cron.CronException;

/**
 * 每月的几号值处理
* 每月最多31天,32和“L”都表示最后一天 * * @author Looly * */ public class DayOfMonthValueParser extends SimpleValueParser { public DayOfMonthValueParser() { super(1, 31); } @Override public int parse(String value) throws CronException { if ("L".equalsIgnoreCase(value) || "32".equals(value)) {// 每月最后一天 return 32; } else { return super.parse(value); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy