taskwarrior icon indicating copy to clipboard operation
taskwarrior copied to clipboard

[TW-48] i18n: Weekend isn't always Sat/Sun

Open taskwarrior opened this issue 7 years ago • 6 comments

Benjamin Podszun on 2012-02-16T15:25:07Z says:

See subject: For a task management tool that shows beautiful reports I'd hope to have it recognize my weekend correctly.

Why? I'm an expat in Israel, I work Sunday to Thursday. There are other potential options [1], so I think this hardcoded behavior should go away. Please add a configuration value.

I tracked the problem down (at least where I most prominently see it) in the code for the calendar report:

report.cpp, renderMonth(), line 1270ff:

// colorize weekends
if (dow == 0 || dow == 6)
  cellColor.blend (color_weekend);

Please don't do that. Ask a locale aware library for the days that represents the beginning of the weekend (in which case I'd hunt down the required configuration elsewhere) or offer a setting equivalent to 'starting day of week' that allows me to define my work week.

1: https://en.wikipedia.org/wiki/Weekend

taskwarrior avatar Feb 12 '18 15:02 taskwarrior

Migrated metadata:

Created: 2012-02-16T15:25:07Z
Modified: 2017-01-16T15:36:31Z

taskwarrior avatar Feb 12 '18 15:02 taskwarrior

Aikido Guy on 2012-02-16T16:24:00Z says:

Thanks for pointing this out... I'm a fellow user and I wasn't aware of the possibility of non-contiguous weekends. Thanks for your link

Non-contiguous workweek

Brunei Darussalam has a non-contiguous work week, consisting of Monday through Thursday plus Saturday. The days of rest are Friday and Sunday.

taskwarrior avatar Feb 12 '18 15:02 taskwarrior

Paul Beckingham on 2012-02-17T03:59:07Z says:

Thank you Benjamin for reporting this. It's not something we've been aware of, or that has been requested before.

This would affect color rules, the calendar command, and evaluation of 'eoww'. The latter might not be solvable.

taskwarrior avatar Feb 12 '18 15:02 taskwarrior

David Patrick on 2012-09-23T17:59:20Z says:

It's becoming clear that our current thinking around weekends/ weekdays/ workdays, doesn't work for everybody, although I think it could still be called "sane defaults". Because of that, the following would only take effect if non-standard weekends were indicated.

What if "weekend" could be user-defined in the .rc;

weekend=fri weekend=sun

The existing

weekstart=monday

still determines sow, eow, and "weekdays" should always remain Mon - Fri, but a new "workdays" should be defined as any day that is not-weekend AND not-holiday. soww is the the first "workday" after "weekstart".

This enhancement should cover every whacky use-case.

taskwarrior avatar Feb 12 '18 15:02 taskwarrior

David Patrick on 2012-09-23T18:04:13Z says:

David Patrick wrote:

This enhancement should cover every whacky use-case.

ahhh, but "holiday" is not necessarily "work holiday".. ...thinks is there any way that a holiday could be flagged as a "work holiday"? That way the holiday files could be used more fully define "workdays".

how does the http://holidata.net "type" field work?

taskwarrior avatar Feb 12 '18 15:02 taskwarrior

Paul Beckingham on 2017-01-16T15:35:53Z says:

I think we need to default to Saturday/Sunday representing a work week, but allow complete override to that. For example, a workweek could be defined as:

workweek=1,2,4,5,6

This would represent Monday, Tuesday, Thursday, Friday and Saturday as an example retail work week.

taskwarrior avatar Feb 12 '18 15:02 taskwarrior