Date
- class ase2sprkkr.common.grammar_types.Date(prefix=None, postfix=None, format='', default_value=None, condition=None, after_convert=None, description='', min=None, max=None)[source]
A date value of the form ‘DD.MM.YYYY’
Class hierarchy
Constructor
- Parameters
prefix (Optional[str]) –
postfix (Optional[str]) –
format (str) –
default_value (Any) –
condition (Optional[Callable[[Any], Union[bool, str]]]) –
after_convert (Optional[Callable[[Any], Any]]) –
min (Optional[int]) –
max (Optional[int]) –
- __init__(prefix=None, postfix=None, format='', default_value=None, condition=None, after_convert=None, description='', min=None, max=None)
- Parameters
min (Optional[int]) – Minimal allowed value.
max (Optional[int]) – Maximal allowed value.
prefix (Optional[str]) –
postfix (Optional[str]) –
format (str) –
default_value (Any) –
condition (Optional[Callable[[Any], Union[bool, str]]]) –
after_convert (Optional[Callable[[Any], Any]]) –
- _grammar = Re:('(?P<d>\d{2}).(?P<m>\d{2}).(?P<y>\d{4})')
- Parameters
name (str) –
- Return type
ParserElement
- grammar_name()[source]
Human readable expression of the grammar. By default, this is what is set by grammar.setName, however, sometimes is desirable to set even shorter string
- _string(val)[source]
The string method do some additional transformation (add prefix, postfix etc.), so the actual way how to convert the value for the output should be here.
- numpy_type
alias of
date
- type_name = 'date'
- I = <Date>
- allowed_types = (<class 'datetime.date'>,)
- datatype
alias of
date
- datatype_name = 'date'