Answer the question
In order to leave comments, you need to log in
How to insert range reference into Google Spredasheets conditional formatting formula?
The problem is this.
I'm making another calendar, there are 365 cells with dates, I need to "conditionally format" these cells in such a way as to mark weekends and holidays with color.
I write the formula:
=or(weekday(cell with date; 2) = 6; weekday(cell with date; 2) = 7), it
works without problems, all weekends are marked.
Next, I have a column with holiday dates.
I add the formula:
=or(weekday(cell with date; 2) = 6; weekday(cell with date; 2) = 7; countif(range of holidays; cell with date)=1),
does not work .
I make a separate rule with the formula:
=countif(range of holidays; cell with date)=1,
doesn't work .
I write the same formula in a cell, it returns True (i.e., the formula is correct).
IMHO, it does not work with a range, because interposed instead of a range the reference to a separate cell - fulfilled, painted.
What to do?
Answer the question
In order to leave comments, you need to log in
1. And now the main question. Why was it necessary to implement module pattern in an ES6 module ? It makes absolutely no sense. Practice by practice, but still.
2. There is also no practical sense in the presence of the posts variable.
3. Feature:
async function _getPostById(id) {
const post = await HTTP.get(`posts/${id}`)
return post
}
I have never seen anything more beautiful in my life.
Keep walking.
Put eslint + plugin in your editor to it - this will help to maintain a uniform code style throughout the project.
As Anton Spirin already wrote - there are semicolons somewhere, somewhere they don’t, it hurts your eyes ...
Again, the module pattern only worsens the code, at least with an extra indent, and also unnecessary _ at the beginning of names, which is not export - then and so it will not go beyond the module, I have to jump my eyes over the code in order to understand what you are exporting.
Well, a couple of notes:
1. do not use array.map if there is no task to get a new array, use array.forEach
bad: https://github.com/emilov2501/module-pattern/blob/...
good: https:/ /github.com/emilov2501/module-pattern/blob/...
generally tin:https://github.com/emilov2501/module-pattern/blob/...
2. If a function can be reused, it's better to reuse, rather than produce 100500 functions in memory that do the same thing:
https://github.com/ emilov2501/module-pattern/blob/...
3. Consider more meaningful names:
https://github.com/emilov2501/module-pattern/blob/...
if the function starts with get, fetch etc. prefix . - somehow it is expected that it will return something, here it is more logical to give prefixes like show
4. redundant code:
https://github.com/emilov2501/module-pattern/blob/...
https://github.com /emilov2501/module-pattern/blob/...
https://github.com/emilov2501/module-pattern/blob/...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question