Enum DateFunctions
- java.lang.Object
-
- java.lang.Enum<DateFunctions>
-
- io.github.erdos.stencil.functions.DateFunctions
-
- All Implemented Interfaces:
Function
,java.io.Serializable
,java.lang.Comparable<DateFunctions>
public enum DateFunctions extends java.lang.Enum<DateFunctions> implements Function
Date handling functions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DateFunctions.Provider
-
Enum Constant Summary
Enum Constants Enum Constant Description DATE
Formats a date object.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ASCTIME
static java.lang.String
DATE_DOTTED
static java.lang.String
DATE_TOSTRING
static java.lang.String
DATETIME1
static java.lang.String
ISO8601
static java.util.List<java.lang.String>
PATTERNS
static java.lang.String
RFC1036
static java.lang.String
RFC1123
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Name of the function used as function identifier.static DateFunctions
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static DateFunctions[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DATE
public static final DateFunctions DATE
Formats a date object.First argument is date format string. Second argument is some date value (either some object or string).
Example call: date("yyyy-MM-dd", x.birthDate)
-
-
Field Detail
-
DATETIME1
public static final java.lang.String DATETIME1
- See Also:
- Constant Field Values
-
DATE_TOSTRING
public static final java.lang.String DATE_TOSTRING
- See Also:
- Constant Field Values
-
DATE_DOTTED
public static final java.lang.String DATE_DOTTED
- See Also:
- Constant Field Values
-
RFC1123
public static final java.lang.String RFC1123
- See Also:
- Constant Field Values
-
RFC1036
public static final java.lang.String RFC1036
- See Also:
- Constant Field Values
-
ASCTIME
public static final java.lang.String ASCTIME
- See Also:
- Constant Field Values
-
ISO8601
public static final java.lang.String ISO8601
- See Also:
- Constant Field Values
-
PATTERNS
public static final java.util.List<java.lang.String> PATTERNS
-
-
Method Detail
-
values
public static DateFunctions[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DateFunctions c : DateFunctions.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DateFunctions valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getName
public java.lang.String getName()
Description copied from interface:Function
Name of the function used as function identifier.Must not contain whitespaces. Must not be empty. Must not change. It is used to look up the function from the template file.
-
-