profound-labs / wallcalendar

Wallcalendar LaTeX documentclass
Other
92 stars 24 forks source link

changing first day of the week? #12

Open anarcat opened 6 years ago

anarcat commented 6 years ago

is there a way to change the start day of the week? it is customary to start the week on sunday here... i couldn't figure out how to change that in the parameters... thanks! :)

gambhiro commented 6 years ago

Yes, this would be good, many people like their calendars with Sunday as first day of the week. I will put this on the TODO list to implement.

It will need an alternative calendar drawing code for each layout, and a class option to toggle the condition.

jilljenn commented 1 year ago

Hi I managed to do this! Using this trick.

https://tex.stackexchange.com/a/348754/7144

Just had to:

I have no skills to make it an easy option, but I can share my patch: wallcalendar-sunday.cls.txt

brandonprry commented 1 year ago

Can confirm the above wallcalendar-sunday.cls works. To use it:

    1 
    2 \documentclass[
    3   year = 2024,
    4   language = english,
    5   eventsCsv = ./data/holidays.csv,
    6   markDefaultsCsv = ./data/mark_defaults.csv,
    7   imageFolder = ./photos/,
    8   paperWidth = 11in - 15mm,
    9   paperHeight = 8.5in - 15mm,
   10   trimSpace = 15mm,
   11   topMargin = 15mm,
   12   %showtrims,
   13 ]{wallcalendar-sunday}

In your original code, line 13 likely only said {wallcalendar}, but placing the wallcalendar-sunday.cls in the same dir as the wallcalendar.cls, then making the tex file with the updated document class, your calendar will be rendered with Sunday first.

image

anarcat commented 1 year ago

I have no skills to make it an easy option, but I can share my patch: wallcalendar-sunday.cls.txt

that's really interesting! it looks like the ultimate source is actually this calendar:

https://texample.net//tikz/examples/changing-the-default-calendar-layout/

and, interestingly, I can't make this work here. I am trying to build the cal-year-planner calendar and for some reason this one stubbornly refuses to change its start date. and i can't build the other calendars, actually. so i'm not sure how any of this works. :)

but i know how to make a pull request, so, for the sake of discussion, i took @jilljenn's code and shoved it in a PR, see #25

ideally, this would (a) work for both monday and sunday as a start day and (b) well, just work at all. :p i understand it might actually already work for some calendars, but that it works for some and not others is quite confusing...

@jilljenn let me know if you want to push your own PR, happy to give you the lead here. :)