DateTimeFile¶
Inheritance Diagram for DateTimeFile
- class grill.names.DateTimeFile(name: str = '', sep: str = ' ')¶
Time based file names respecting iso standard.
Config:
year
Between
datetime.MINYEARanddatetime.MAXYEARinclusive.month
Between 1 and 12 inclusive.
day
Between 1 and the number of days in the given month of the given year.
hour
In
range(24).minute
In
range(60).second
In
range(60).microsecond
In
range(1000000).Composed Fields:
date
year month day
time
hour minute second microsecond
Note
When getting a new default name, current ISO time at the moment of execution is used.
- Example:
- get_pattern_list() list[str]¶
Fields / properties names (sorted) to be used when building names.
Defaults to [date, time] + keys of this name’s config
- property datetime: datetime¶
Return a
datetime.datetimeobject using this name values.
- property name: str¶
This object’s solved name.
- Raises:
ValueError – If an invalid string is provided when setting the attribute.