Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if the last processed date doesn't exist, shouldn't we pick a much earlier date and just two weeks ago? #5

Open
tomlue opened this issue Oct 10, 2024 · 0 comments
Assignees

Comments

@tomlue
Copy link
Contributor

tomlue commented Oct 10, 2024

def get_last_processed_date():

def get_last_processed_date():
    last_processed_file = Path('last_processed_date.txt')
    if last_processed_file.exists():
        with open(last_processed_file, 'r') as file:
            return datetime.strptime(file.read().strip(), "%Y-%m-%d")
    else:
        print("No last processed date found, using 2 weeks before today.")
        return date.today() - timedelta(days=14)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants