Giter Site home page Giter Site logo

Wrong Day Of Week about nepali-date HOT 6 CLOSED

subeshb1 avatar subeshb1 commented on June 15, 2024
Wrong Day Of Week

from nepali-date.

Comments (6)

amarbibek avatar amarbibek commented on June 15, 2024 1

I see.
It got messed up because of month.
Thank you very much.

from nepali-date.

issue-label-bot avatar issue-label-bot commented on June 15, 2024

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.98. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

from nepali-date.

subeshb1 avatar subeshb1 commented on June 15, 2024

Hi @amarbibek,
Sorry for the late reply.

The constructor is as follows:

NepaliDate(year: number, monthIndex: number, date: number)

You are passing in date for the month of Ashwin whose month index is 5. So, it is showing the date of next month. For Bhadra, the index is 4. The month index is expected in this constructor. This is done to make it consistent with the existing javascript Date library which uses the same approach.

Reference from the doc: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date

Here are the constructor docs:
https://subeshb1.github.io/Nepali-Date/classes/nepalidate.html

from nepali-date.

subeshb1 avatar subeshb1 commented on June 15, 2024

Closing this as a duplicate of #25

Feel free to re-open ore create another issue if your queries are not met.

from nepali-date.

amarbibek avatar amarbibek commented on June 15, 2024

Thanks for the response.

I could figure that out.
My actual concern is the day of the week, "०८, आश्विन २०७७" was "सोमबार " not "बिहिबार".

from nepali-date.

subeshb1 avatar subeshb1 commented on June 15, 2024

For Bhadra:
Screen Shot 2020-08-27 at 20 19 10

For Ashwin:
Screen Shot 2020-08-27 at 20 24 09

The weekday is Thursday for Ashwin 8, 2077:
Screen Shot 2020-08-27 at 20 23 05

Is it not right? Do let me know. Thanks!

@amarbibek

from nepali-date.

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.