ttscoff / bunch

Documentation repository for Bunch.app
https://bunchapp.co
116 stars 5 forks source link

weekday conditional off by one day #284

Closed karlfast closed 1 year ago

karlfast commented 1 year ago

The weekday conditional only works on the day before the actual day.

I'm submitting this on Monday morning (about 10am CST) and have just tested the following examples. The conditional works when I make it about Sunday (ie: the day before). It fails when I make it about Monday (ie: the day it should trigger)

This bunch conditional does NOT work when it is Monday

if weekday is Monday
    Messages
end

These bunches DO work on Monday.

if weekday is Sunday
    Messages
end

if weekday is before Monday
    Messages
end
ttscoff commented 1 year ago

I'm testing on tuesday, and if weekday is tuesday is functioning fine for me. What Time Zone is your system set for? What language? I'm not sure what could be affecting it like that.

-Brett

On 16 Jan 2023, at 10:15, karlfast wrote:

When I use the weekday conditional it works if I assume it is the day before the actual day.

For example, I'm submitting this on Monday morning (about 10am CST) and have just tested the following examples

This bunch conditional does NOT work when it is Monday

if weekday is Monday
    Messages
end

These bunches DO work on Monday.

if weekday is Sunday
    Messages
end

if weekday is before Monday
    Messages
end

-- Reply to this email directly or view it on GitHub: https://github.com/ttscoff/bunch/issues/284 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

karlfast commented 1 year ago

Yesterday (Monday) and last week it would not work. I tried this many times over several days. I only posted yesterday given how many times this failed for me.

But today it worked. I saw your reply, opened my bunch, and changed Monday to Tuesday, and re-ran my test bunch. It worked fine. Yesterday it only made the adjustment as noted above. Weird, yes, but perhaps there is some mistake on my end that I overlooked.

You asked about my settings and there is nothing special.

Time Zone: CST Language: English (US)

I wondered if maybe I had First Day of Week set to Monday. In Busycal, yes. But not in System Prefs > Language & Region > Advanced. There the week starts on Sunday.

CONSIDER THIS SOLVED/CLOSED for now. I will followup if the problem returns or I discover something.

valkenrath commented 1 year ago

sorry to be the bearer...

if weekday is fri
    (log its fri)
end
if weekday is thurs
    (log its thurs)
end

produces

2023-04-07 09:17:36: ⚪[Test] Open >>>>>>>>>>>>>>>>>>>>>
2023-04-07 09:17:36: ⚪[Test] Processing command "log its thurs"
2023-04-07 09:17:36: 🟡[Test] Logger: its thurs

at

❯ date
Fri  7 Apr 2023 09:17:54 AEST

on Ventura 13.3, with these regional settings: CleanShot 2023-04-07 at 09 18 37

tried (to no effect):

ttscoff commented 1 year ago

I still haven't been able to replicate this, much less track down the cause. Will try to take another look at it as soon as I have some free time.

On 6 Apr 2023, at 18:21, valkenrath wrote:

sorry to be the bearer...

if weekday is fri
    (log its friday)
end
if weekday is thurs
    (log its thursday)
end

produces

2023-04-07 09:17:36: ⚪[Test] Open >>>>>>>>>>>>>>>>>>>>>
2023-04-07 09:17:36: ⚪[Test] Processing command "log its thurs"
2023-04-07 09:17:36: 🟡[Test] Logger: its thurs

at

❯ date
Fri  7 Apr 2023 09:17:54 AEST

on Ventura 13.3, with these regional settings: CleanShot 2023-04-07 at 09 18 
37

tried (to no effect):

  • using 'Friday' instead of 'fri'
  • changing (regional settings) date format
  • debug logging in bunch (that log output is with debug log enabled)
  • restarting bunch
  • restarting macOS

-- Reply to this email directly or view it on GitHub: https://github.com/ttscoff/bunch/issues/284#issuecomment-1499745351 You are receiving this because you modified the open/close state.

Message ID: @.***>