Skip to content

Instantly share code, notes, and snippets.

@avelino
Created June 1, 2019 23:29
Show Gist options
  • Save avelino/f323fd564c6258119adf45653e559dbe to your computer and use it in GitHub Desktop.
Save avelino/f323fd564c6258119adf45653e559dbe to your computer and use it in GitHub Desktop.
from datetime import datetime
github_date = datetime.strptime(input_data['github_date_str'], '%Y-%m-%dT%H:%M:%SZ')
weeknumber = int(github_date.strftime("%w"))
task_date = 'tuesday'
if weeknumber >= 4 and weeknumber <= 5:
task_date = 'thursday'
return {'task_date': task_date}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment