feluelle commented on a change in pull request #5127: [AIRFLOW-4343] Show
warning in UI if scheduler is not running
URL: https://github.com/apache/airflow/pull/5127#discussion_r276790453
##########
File path: airflow/macros/__init__.py
##########
@@ -67,6 +67,23 @@ def ds_format(ds, input_format, output_format):
return datetime.strptime(ds, input_format).strftime(output_format)
+def datetime_diff_for_humans(dt, since=None):
+ """
+ Return a human-readable/approximate difference between two datetimes, or
+ one and now.
+
+ :param dt: The datetime to display the diff for
+ :type dt: datetime
+ :param since: When to display the date from. If ``None`` then the diff is
+ between ``dt`` and now.
+ :type from: None or datetime
Review comment:
```suggestion
:type since: None or datetime
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services