Coder Social home page Coder Social logo

Comments (2)

AbnormalDistributions avatar AbnormalDistributions commented on May 29, 2024 1

Hey!

The part of this code uses the python datetime.today().weekday() function. It returns a number corresponding to the day of the week it is currently. Here's the documentation.

To do what you want, I would create a list of dates that the trash is going to be taken out, as it changes monthly. Then I would write a short script to check and see if it's those dates.

Something like this:

trash_list = [10.23, 10.30, 11.13] # list of dates in month.date format
today =  float(datetime.today().strftime('%m.%d'))
for date in trash_list:
    if today == date:
        draw.rectangle((345, 13, 705, 55), fill =black)
        draw.text((355, 15), 'TAKE OUT TRASH TODAY!', font=font30, fill=white)

I haven't tested that code, but something like that should do what you are looking for.

from e_paper_weather_display.

pjockey avatar pjockey commented on May 29, 2024

Thanks for the quick reply. I'll give it a go.

from e_paper_weather_display.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.