1 /*
2 * CSVeed (https://github.com/42BV/CSVeed)
3 *
4 * Copyright 2013-2023 CSVeed.
5 *
6 * All rights reserved. This program and the accompanying materials
7 * are made available under the terms of The Apache Software License,
8 * Version 2.0 which accompanies this distribution, and is available at
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 */
11 package org.csveed.annotations;
12
13 import java.lang.annotation.ElementType;
14 import java.lang.annotation.Retention;
15 import java.lang.annotation.RetentionPolicy;
16 import java.lang.annotation.Target;
17
18 /**
19 * Date is a special case, since it will require a format to be supplied. The format is similar to the one used in
20 * SimpleDateFormat. As a matter of fact, this class is used under the hood to arrange the conversion.
21 */
22 @Target(ElementType.FIELD)
23 @Retention(RetentionPolicy.RUNTIME)
24 public @interface CsvDate {
25
26 /**
27 * The format to use for converting between String and java.util.Date
28 *
29 * @return format for the Date
30 */
31 String format() default "yyyy-MM-dd";
32 }