Commit 3eecc039 by Michael DeHaan

Merge pull request #6656 from Jmainguy/setup

Added ansible_date_time.weekday as a fact. This returns Monday,Tuesday,W...
parents 8c7828d4 b17b5ad8
......@@ -416,6 +416,7 @@ class Facts(object):
now = datetime.datetime.now()
self.facts['date_time']['year'] = now.strftime('%Y')
self.facts['date_time']['month'] = now.strftime('%m')
self.facts['date_time']['weekday'] = now.strftime('%A')
self.facts['date_time']['day'] = now.strftime('%d')
self.facts['date_time']['hour'] = now.strftime('%H')
self.facts['date_time']['minute'] = now.strftime('%M')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment