Created
October 1, 2017 17:44
-
-
Save nloadholtes/d8ae1ebe89bd8a13698db2580041786f to your computer and use it in GitHub Desktop.
Create a URL based on today's date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
class MagicURL(object): | |
def __init__(self, base_url): | |
self.base_url = base_url | |
def __str__(self): | |
today = datetime.today() | |
return self.base_url + "/" + today.strftime("%Y-%m-%d") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment