Enum DateFunctions

    • 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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface io.github.erdos.stencil.functions.Function

        call
    • 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)

    • 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 name
        java.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.

        Specified by:
        getName in interface Function
        Returns:
        function identifier