Skip to content

Instantly share code, notes, and snippets.

View Rob-McCormack's full-sized avatar

Rob McCormack Rob-McCormack

View GitHub Profile
DELETE ME - Must create a new gist with an initial file
@Rob-McCormack
Rob-McCormack / how_long_ago.py
Last active January 11, 2023 16:25
Converts a date string to a human readable date string.
"""
This program converts a date string to a human readable date string.
Example: `2022-11-5 7:00:10` --> 2 months ago
"""
import datetime
def calculate_time_difference(date_input):
now = datetime.datetime.now()
return now - date_input
@Rob-McCormack
Rob-McCormack / test.md
Created November 26, 2022 16:32
Test for URL for published Python 3 code samples

Possible MD file

  • this could be inclded if necessary