5 Star 3 Fork 0

HarmonyOS-TPC / ohos-validation-komensky

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
DateNoWeekend.java 1.51 KB
一键复制 编辑 原始数据 按行查看 历史
tanjunshui 提交于 2021-04-15 20:12 . ohos版本第一次提交
/*
* Copyright (c) 2013, Inmite s.r.o. (www.inmite.eu).
*
* All rights reserved. This source code can be used only for purposes specified
* by the given license contract signed by the rightful deputy of Inmite s.r.o.
* This source code can be used only by the owner of the license.
*
* Any disputes arising in respect of this agreement (license) shall be brought
* before the Municipal Court of Prague.
*/
package eu.inmite.harmony.lib.validations.form.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.text.DateFormat;
/**
* Validate input as date that is not on weekend. <br/>
* {@link java.text.DateFormat} is used to parse input string. To specify the input format, set {@link #datePattern()}
* or {@link #dateStyle()}.
*
* @author Tomas Vondracek
*/
@Target(value = ElementType.FIELD)
@Retention(value = RetentionPolicy.RUNTIME)
public @interface DateNoWeekend {
/**
* date pattern that will be used to parse input date
*
* @return datPattern
*/
String datePattern() default "";
/**
* if no pattern is defined date style will be used to initialize {@link DateFormat}
*
* @return datFormat
*/
int dateStyle() default DateFormat.SHORT;
/**
* messageId()
*
* @return message id
*/
int messageId() default 0;
/**
* order()
*
* @return order
*/
int order() default 1000;
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/HarmonyOS-tpc/ohos-validation-komensky.git
git@gitee.com:HarmonyOS-tpc/ohos-validation-komensky.git
HarmonyOS-tpc
ohos-validation-komensky
ohos-validation-komensky
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891