Code Monkey home page Code Monkey logo

Comments (3)

Afterwalker99 avatar Afterwalker99 commented on May 25, 2024

@yomagicdev I had the same problem too, seems like it's because of Locale for your phone. Some countries starts with Monday as the first day of the week while some country start with Sunday as the first day of the week. Make sure the dayOfWeekInitials takes in account the locale of the phone, hope this helps!

from elegantcalendar.

francescodalsavio avatar francescodalsavio commented on May 25, 2024

@yomagicdev try to change the calendar configuration ->
Calendar.current -> Calendar.init (identifier: .gregorian),
This way it works for me correctly.

example:
let configuration = CalendarConfiguration (calendar: Calendar.init (identifier: .gregorian)...

I found that each location has a different (Calendar.current.firstWeekday), this is the cause of the error.

from elegantcalendar.

ThasianX avatar ThasianX commented on May 25, 2024

Great discussion here guys. Was in a rush when I initially created this library so wasn't able to fully test with calendars of different countries.

from elegantcalendar.

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.