moment.js thinks that 2013-12-31 is week 1, not week 53

The moment.js library is awesome, and I use it almost all the time, but I recently ran into something interesting. I'm trying to plot data by week of the year, and one of the data points was...

Creating a year/week format for current date in R

I'm writing this post because I could find no other thread where the question was already answered. What could be the best code to create a "y/w" format (y being a 2-digits year and w a 2 digits...

How to install multiple packages?

How would I got about installing multiple packages in R? I tried the following code: install.packages("EIAdata", "gdata", "ggmap",...

Get date of specific weekday after a specified date with Moment.js

I am trying to get the date for the next instance of a weekday after a given date. The weekday may be any day from Monday through Sunday. I am using the Moment.js library but there doesn't seem to...

Use a Field in main Table to Update a Field in Another Table in Access

I have three tables in Access DB, "tbl_BO" which is linked to Excel sheet which is updated every monday, "tbl_KPI1" and "tbl_KPI2. Every table has field called "CW", means calendar week. "tbl_BO"...

Check if the input day is Monday with moment.js

Well, I want to check if a day of date is Monday like: var myDate = new Date(); moment(myDate, 'DD-MM-YYYY').dayIs('monday') In my country the first day of week is Monday, so, really I want...

Counting google analytics unique events in BigQuery

I have managed to calculate total events by ISOweek but not unique events for a given Google Analytics Event using BigQuery. When checking GA, total_events matches the GA interface on the dot but...

R Script .bat file - Adding Source before executing

I have an 'R' file which inserts reads data from a database, does some calculations, then re-inserts data back into a table. Before i execute the script, I run 'Source' as below.. I want to use...

mongodb aggregate trunc date function?

worked with a bunch of other SQL databases before; like Postgres and...

Get Last week date range from sunday to saturday moment js

I need to get last week date range from sunday to saturday, but this code moment().subtract(1, 'weeks').startOf('isoWeek') moment().subtract(1, 'weeks').endOf('isoWeek') gives date range from...

Vuex: how to define a state variable with a value that is based on the value of another state variable?

In my store I need to have both the current week (constant) and a variable initially equal to the current week, that might get changed by mutations: export default new Vuex.Store({ state: { ...

How to send data from dialog back to parent container with react?

I have a react-big-calendar (The parent container), I have also a select which, the events of the calendar are fetched according to this select ( doctor name ) and I have a button when I click on...

How to revert the drag and drop events with React fullCalendar using fetch?

I have a react FullCalendar and I want when I drag and drop events, a snackbar will be appeared with the cancel button, when I click it, I will call the revert function of the drag and drop. My...

R Package ISO Week Returning incorrect values compared to ISO 8601 in Spotfire

Following this article, I am using the ISOWeek "R" package in Tibco Spotfire to return the ISOWeek for a specific...

Get Start Date from IsoWeek

I want to display user numbers per week from Google Analytics in our warehouse. I receive raw data through our ETL per week and the iso week as a string: GaIsoYearIsoWeek:'201951' with the...

extracting methods in their own files in ExpressJS: Cannot use import statement outside a module

I made my first app today, with ExpressJS. Problem is index.js is too big (600 lines), I would like to organize my code into differents files. The easiest part are static dates functions. I have 5...

Convert to local time zone from latitude and longitude R

I have one data frame with a lot of locations (around 30.000), and I need to convert the time of each location for the local time. I tried some ideas like this one, and this one. But they did not...

How to split week start date and week end date based on custom period dates in another table

I have a scenario where I need to split weeks for below period start date and end date for whole years in the calendar starting from year 1980 to 2050, period start and end dates are stored in a...

"Right-hand side of 'instanceof' is not an object" MomentJS

Having some serious issue with momentjs. I keep getting "Right-hand side of 'instanceof' is not an object" and not getting much online. var startOfWeek; $(document).ready(function () { ...

@PostConstruct populate DB at startup - Spring Boot 2.2.4 upgrade

I'm upgrading my application from Spring Boot 1.5 to 2.2. Now my db inits aren't working. The culprit in my case seems to be the HibernateTransactionManager when using this my @PostConstruct or...

How do you get a date's calendar week number like Outlook does?

I have to show a date's calendar week using the same numbering used in Outlook. The numbering has to follow the italian (it-IT) culture. The Outlook calendar is configured using Monday as first...

how to solve "ERROR: Names must be unique." in r-package ggstatsplot?

The problem: I tried to run a function (ggwithinplot) to plot data in an r package, ggstatsplot. But it took a long time to run this function, and nothing turned out. So I shut down this function...

What is the difference between isoWeek and week?

I am using moment to check if a day falls within a certain week and my test case is failing on a difference between isoWeek and week for the dates 2020-04-11 and 2020-04-12. When I use isoWeek...

CondaEnvException: Pip failed. I am getting a pip subprocess error when trying to create an environment in conda using a .yml file

I am trying to create an environment in conda using a .yml file. Here are the commands i have run, git clone https://github.com/fastai/fastai cd fastai conda env create -f environment.yml The...

How to find data in for every day of week in mongoose node js

Query const weekGraph = await tmUserSubscriptions.aggregate([ { $match:{$and:[{subscriptionId: mongoose.Types.ObjectId(subscriptionId)}, ...

Transform numeric field (YYYY.WW) to ISOweek() date field

The data frame entails a date column in the format YYYY.WW. It is imported from a csv. and classified as numeric which does not allow me to properly use it for time series analysis or ggplot...

MomentJs monday by week number bug

I have a function that grabs the date key with format of YYYY-MM-DD, eg. 2021-03-29 (monday) get its week number (13), and using that, get that week number's monday, in case of 2021-03-29 it would...

How to calculate weekly and monthly appearances of distinct string values in SQL Google Big Query?

I am new to SQL, and I have a dataset with date values and domain column. Domain column only contains values 'personal' and 'business'. What I am trying to accomplish is to calculate weekly and...

How to get the Isoweek from DatetimeIndex

I have a simple pandas dataframe with a date as index: import pandas as pd data = {'date': ['2010-01-04','2014-03-15','2017-07-15','2019-12-28','2005-01-03'], 'price':...

Wrong Week of year returned using ISOWeek.GetWeekOfYear()

I'm here to ask some help about getting the Week of Year for a given date using c# on .net core. For some reason when I use ISOWeek.GetWeekOfYear() I get wrong values. For instance on this...