laravel-calendar icon indicating copy to clipboard operation
laravel-calendar copied to clipboard

Starting the week on Monday

Open matthieucalu opened this issue 10 years ago • 14 comments

In Europe calendars start the week on Monday instead of Sunday. Is it possible to choose this? If not, which part of the code should I look at to change this?

matthieucalu avatar Aug 22 '14 13:08 matthieucalu

I believe this is a PHP option itself. If you set it in your php.ini (or somewhere like that) if you echo day[0] it may come out as monday. Search around google and i'm sure you'll find an option for that somewhere.

rginnow avatar Sep 04 '14 16:09 rginnow

Hi, I have not set a method for a start day, I didnt event think of it, I'll add that as soon as i can. :)

makzumi avatar Sep 04 '14 16:09 makzumi

And sorry, i didnt even notice this issue was open, i didnt get notified

makzumi avatar Sep 04 '14 16:09 makzumi

When will this be fixed?

ronnievisser avatar Sep 30 '14 10:09 ronnievisser

I'm also interested in finding a solution to start the week on Monday!

urbankid avatar Oct 02 '14 16:10 urbankid

Im using your great plugin since today and for my project I would really need that the week starts on monday!

kremsy avatar Nov 15 '14 11:11 kremsy

Hi! github-newbie here, with newbie doubts. I need that feature working whithin a pair of weeks maximum, so I was thinking to develop by myself but I've found out that it's already done on several related forked projects. What should I do? Why that projects haven't done a pull request of this feature? How things are done around here? Thanks ^^

davidgras avatar Dec 18 '14 17:12 davidgras

Hi Folks! I'm real sorry I havent been able to update this thing, I've been buried in other projects for weeks now :S I can't really update this right now, maybe after x-mas, sooo sorry :(

makzumi avatar Dec 18 '14 17:12 makzumi

Don't worry makzumi, take it easy ;)

I just want to understand what's the best behaviour for the community, for the owner:

  • forked the project, do some development and pull requests
  • forked a forked project, do some development and pull requests (Can I do a pull requests to the original project from a forked-forked project?? I don't think so :S)
  • asks the forked project author to do pull requests

davidgras avatar Dec 18 '14 17:12 davidgras

David,

If you have seen it done in other projects and can find out where its done in their code, fork Makzumi's project and fix it for him. Then do a pull request with his and your code and github will show the differences and all you do is describe the change you made. Makzumi can then accept or deny your pull request. Be aware that I will check to make sure your fix does actually work. If makzumi hasn't had the time, I'm going to help and try to fix this myself as well.

Makzumi, if you would like help, I will gladly dedicate some time to these issues.

rginnow avatar Dec 18 '14 19:12 rginnow

Understood, it seems very neat! Thank you and sorry for the off-topic.

davidgras avatar Dec 18 '14 19:12 davidgras

@davidgras No problem, if you are new to Git, I recommend finding tutorials either by Github, Bitbucket or elsewhere around the internet.

As for this project, I'm looking into a fix for this now.

rginnow avatar Dec 19 '14 00:12 rginnow

I decided this issue. We must go to vendor/..../Calendar.php In the function buildBody(), after this row:

$startingDay = date('N', strtotime('first day of this month', strtotime($now_date)));

we must add:

$startingDay = $startingDay - 1;

Before generate calendar, we must rename array elements in setDayLabels

kazrusm avatar Jan 10 '15 21:01 kazrusm

@kazrusm this is only for month view, not for the week view?

Donny5300 avatar Apr 01 '15 21:04 Donny5300