Code Monkey home page Code Monkey logo

Comments (3)

sottey avatar sottey commented on June 3, 2024

I am looking into implementing this in my fork, Ultodo, but here is how I worked around it:

I have an alias:
_yesterday='echo Thu | tr '''[:upper:]''' '''[:lower:]''

that gets me the abbreviated day name in lowercase...

Then another alias:

alias week="ultralist l duebefore:$(_yesterday)"

This is a bit convoluted, but I needed yesterday because using today results in showing the 7 days up to today, since it uses closest monday. Using yesterday gets us this week.

I hope to implement thisweek soon so that aliases are not needed.

Thanks

from ultralist.

ltrubov avatar ltrubov commented on June 3, 2024

@sottey will your fix make lastweek cover the previous 7 days? Because I think it'd be kind of odd -- a week is normally thought of as the set of 7 different consecutive days of the week (Monday - Sunday or Sunday - Saturday) depending on locale and convention, not any 7 days.

It makes more sense to have the week start on Monday -- then thisweek is any day between the most recent (including today) Monday and the closest upcoming (including today) Sunday, lastweek is the week starting the Monday before most recent, and nextweek is the week starting the Monday after the closest upcoming Sunday.

Take a look at my fix at #259 ; I've also added the monthly options -- and by comparison, this will make weekly ones standout -- nobody thinks "last month" as the 30 days before today -- it's assumed to be the calendar month, regardless of where in the current month we are.

from ultralist.

sottey avatar sottey commented on June 3, 2024

Hi @ltrubov ,

Yeah, that was what I did. I feel like "7 days from the most recent past Monday" makes the most sense. Your work in the input_parser was more elegant than mine so I incorporated it, thanks!

LOVE the month stuff you did. I have incorporated that as well. Thanks!

from ultralist.

Related Issues (20)

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.