geotribu_cli.utils.dates_manipulation module¶
Extract date from content path, location or name.
Author: Julien Moura (https://github.com/guts)
- geotribu_cli.utils.dates_manipulation.get_date_from_content_location(input_content_location)¶
Extract date from content location string.
- Paramètres:
input_content_location (str) – content location path.
- Renvoie:
date object
- Type renvoyé:
date
Example:
> sample_content_location = ( "articles/2008/2008-08-22_1-introduction-a-l-api-google-maps/" ) > sample_content_date = get_date_from_content_location(sample_content_location) > print(type(sample_content_date), sample_content_date) <class 'datetime.date'> 2008-08-22
- geotribu_cli.utils.dates_manipulation.get_days_until_next_month(from_date=None)¶
Return the number of days until the next month.