Override default date rage for DayGridMonth view - fullcalendar

I have been looking high and low and so far have seen no options via the code or anything else that seems to even come close to what i am asking. My request is simple enough. Typically when we want to display in a month grid view the month of September 2019 we expect the start of this month to be 9/1/2019 and the end to be 9/30/2019 with anything before or after to be considered other month.
However, I need for my calendar to have a different date range for the month of September 2019. This is so that it aligns with how we manage months. With the exception of the month of October all other months of the year are modified for different date range.
January = 01/01 to 01/30
February = 01/31 to 03/01
March = 03/02 to 03/31
April = 04/01 to 05/01
May = 05/02 to 06/01
June = 06/02 to 07/01
July = 07/02 to 07/31
August = 08/01 to 08/30
September = 08/31 to 09/30
October = 10/01 to 10/31
November = 11/01 to 12/01
December = 12/02 to 12/31
In many cases I do not need to make many adjustments (just some add/remove "fc-other-month" class, as the previous months ending dates are also visible (if using the 6 week enabled flag, which is also set by default), however, in September 2019, 09/01 is on a Sunday of the first week meaning that the previous week that would include 8/31 is not rendered.
I can explore a "brute force" type method of checking for this condition and then prepending another row on top of week 1 with the additional dates needed but I have to believe that there is a simple method where i can simply state the months start and end date range.

Related

List all months from date until another date

I have two dynamic dates:
"A5" - 2018-12-01
"B5" - 2019-04-31
I would like something that would help me list all the months along with their specific years that are between both those dates (including both of them).
The output would be:
December 2018
January 2019
February 2019
March 2019
April 2019
I need to do this without a Script. These dates difference are never going to be bigger than 2 years.
Is there a way to do this that you know of? I'm kind of stuck.
=ARRAYFORMULA(TEXT(UNIQUE(EOMONTH(ROW(INDIRECT(
DATEVALUE(A5)&":"&DATEVALUE(B5))), 0)), "mmmm yyyy"))
note: 2019-04-31 is not a valid date
Date(year(B5),month(B5),1)
Date(year(B5),month(B5)-1,1)
Date(year(B5),month(B5)-2,1)
I repeated this formula only changing the month part, which gives a date list. Then, with a helper column, I used, if(thenewcells>=date(year(A5),month(A5),1,"include","")
This lets me know which ones to include.
However, I need to create these in advance, not dynamic

Representing an entire day or week or month as a number like timestamp

How can a day or week or month, essentially a range of time be represented by a single number?
The next interval would represent a number 1 more than the number for the previous interval, just how the next second is 1 more than the previous second, in timestamp representation.
Given a bunch of such numbers, the larger number simply means its representing a time interval afterwards in time, when compared to a number smaller than it.
Just realized if I stick to UTC and represent the day as YYYYMMDD, this becomes a number that I am looking for.
20180420 // 20 april 2018
20180421 // 21 april 2018
20180510 // 10 may 2018
20190101 // 1 jan 2019
This works for representing a day perfectly, I think.
For week, maybe do ceil() of days of current month divided by 7 for representing week as a number W and then using the format: YYYYMMW.
2018043 // 3rd week of april 2018
2018045 // 5th week of april 2018, though may not be the 5th week semantically but representation model works, greater than 4th week of april 2018 and smaller number than 1st week of may 2018
For month, simply YYYYMM works.
I feel so smart right now! 😄

What date format is 636529536000000000?

I have to maintain an ASPX page that increments the date/time by passing a value in the querystring in this format:
636529536000000000 in reference to 31 January 2018
636530400000000000 in reference to 01 February 2018
The url format is: /reservas.aspx?t=636530400000000000
What is this date/time format?
It is the number of ticks where a tick is one hundred nanoseconds or one ten-millionth of a second. The number of ticks is measured since the epoch DateTime.MinValue (12:00:00 midnight, January 1, 0001). For example:
new DateTime(636529536000000000).ToString("F", CultureInfo.InvariantCulture)
outputs:
Wednesday, 31 January 2018 00:00:00
Could be a number of days from certain date, similar to julian date calculation:
https://en.wikipedia.org/wiki/Julian_day#Julian_date_calculation
Potentially incorporating the time as well?
Without details of the code I cant really advise from a provided value.

Google Analytics - showing different revenue for same month viewed

When viewing - Acquisition>>>All Traffic>>>Source/Medium with organic traffic segment loaded with dates Jan 1 - Oct 31, with the revenue metric (line chart graph setting) while viewing by revenue per month, I get the total amount of organic revenue per month from Jan 1 - October 31st. Each month shows the total organic revenue.
However, If I change the date range to only show revenue for October 1st - 31st (note, nothing else is changed but removing Jan 1 - Sept 31), the total revenue for October doesn't match the October revenue when I view it from Jan 1 - October 31st. It is really odd and I don't understand why.
Does anyone have any insight on why the month of October shows different revenue when I set the dates for October 1st - 31st compared to Jan 1st - October 31st with each month's revenue isolated in the graph?
The most likely explanation is that it's a sampling issue, go into GA and look for the shield icon at the top of the report page. If it's any color other than green, hover over it to see what the sampling is. If that is the issue, the main way to get unsampled data is to use a smaller date range, or looking for 'unsample' tools.

Moment.js issue if trying to set date on 1.1. for actual year

I'm trying to get date for first day of the new year, it means that I tried something like this:
dateFrom = moment().month(0).day(01).format('YYYY-MM-DD');
But it gives me date:
2013-12-30
Instead of the
2014-01-01
How can I solve it please?
Thanks for any advice.
You are looking for date instead of day if you want to define the day of the month.
This works:
moment().month(0).date(1).format('YYYY-MM-DD');
The date method defines day of the month, docs here.
The day method defines the day of the week. From the docs:
So, by using day(1) you are asking to get the nearest Monday. In your case the nearest Monday to January 1st, 2014 is December 30th, 2013

Resources