How to install murrine engine?
321
The package for the murrine engine, the cairo-based gtk+-2.0 theme engine is gtk2-engines-murrine
. cairo
is a 2D vector graphics library.
sudo apt-get install gtk2-engines-murrine
The murrine engine is based on clearlooks and approximately 30% faster.
Related videos on Youtube
Author by
hampani
Updated on September 18, 2022Comments
-
hampani over 1 year
I need to get the first day of the week by using the week number (weeks starting on Monday). I found this piece of code here: https://stackoverflow.com/a/46343917/13498210. However, the code doesn't seem to work. For example, inputing week 34 returns the date 08-22 (the sunday of the previous week) instead of the correct 08-23.
My question is, is it safe to just "add" one day to the result? Or will that create bugs?
function getFirstMondayOfWeek(weekNo) { var firstMonday = new Date(new Date().getFullYear(), 0, 4, 0, 0, 0, 0); while (firstMonday.getDay() != 1) { firstMonday.setDate(firstMonday.getDate() - 1); } if (1 <= weekNo && weekNo <= 52) return firstMonday.setDate(firstMonday.getDate() + 7 * (weekNo - 1)); firstMonday.setDate(firstMonday.getDate() + 7 * (weekNo - 1)); if (weekNo = 53 && firstMonday.getDate() >= 22 && firstMonday.getDate() <= 28) return firstMonday; //JUST ADD A DAY HERE return null; }
-
fuzzybear over 2 yearswhat do you mean first Monday of the week ? do you mean Month?
-
hampani over 2 yearsI want to get the first day of the week, with weeks starting on Mondays.
-
Mihai T over 2 yearsso basically you want to change the default ' first-day ' ( 0 ) to be Monday instead of Sunday ?
-
-
RobG over 2 yearsPlease post working code here. A good answer should explain why the OP has their issue and how your code fixes it.
-
RobG over 2 yearsAdding and removing days as milliseconds is not reliable as not all days are 24 hours long were daylight saving is observed.
-
lejlun over 2 years@RobG I'm not sure I get what you mean. Could you give an example where this function would fail?
-
RobG over 2 yearsOver a daylight saving boundary where a day may be 23 or 25 hours long (or 23.5 or 24.5 if the DST offset is 30 minutes).
-
RobG over 2 yearsPeople shouldn't have to go to another site to see the code. It also makes commenting on the code more difficult, and links rot.
-
fuzzybear over 2 yearsI get your view RobG but I don't mind clicking a link it helps to proliferate code out there IMHO, what if SO shutdown, etc, there are swings and roundabouts to both I guess?
-
RobG over 2 yearsLike Gary, SO will never die…