need help in making one month calendar

0 favourites
  • 5 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hi,

    I want to make a calendar using date plugin, Problem I'm facing here is How do I get First & Last day of the current month. Somehow I'm able to get First day of the first week but how do I get last day of last week?

    Tagged:

  • Hi,

    I want to make a calendar using date plugin, Problem I'm facing here is How do I get First & Last day of the current month. Somehow I'm able to get First day of the first week but how do I get last day of last week?

    When using date.getday(date.now) you will get the current day of the week, 0 = sunday so 0 is the last day of the week.

    EDIT: I noticed now that you ment first and last day of the MONTH, i will check it out and come back xD sry its early.

    EDIT AGAIN: So you could just add variables to make it easy, where you use date.getmonth(date.now) and get the current month ,0 - january, 11-decemeber

    Then do like if currentmonth = 0 then lastday = 31 , if currentmonth=1(feb) then lastday = 28

  • Then do like if currentmonth = 0 then lastday = 31 , if currentmonth=1(feb) then lastday = 28

    yes that I can do but I'm trying to do it automatically. because feb month cannot be done in this way. So I am figuring out to do it automatically. If there any way of getting current month's first and last day.

  • > Then do like if currentmonth = 0 then lastday = 31 , if currentmonth=1(feb) then lastday = 28

    yes that I can do but I'm trying to do it automatically. because feb month cannot be done in this way. So I am figuring out to do it automatically. If there any way of getting current month's first and last day.

    Check this JS guide: codegrepper.com/code-examples/javascript/get+last+day+of+month+js

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I didn't understand that code, I'm a non programmer.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)