P
P
Phoen2015-08-21 11:26:15
JavaScript
Phoen, 2015-08-21 11:26:15

How to find out which bitmask includes the current day of the week?

Not strong in programming, so I ask for advice.
Actually, there is some object that has 2 values ​​​​attached to it (in fact, these are the days of the week represented in a bit mask, for example:
1) 63 Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
2) 64 Sunday
)). Question: what is the best way to understand from the script which scatter the current date belongs to?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
0
0xD34F, 2019-02-23
@SoFuWa

hasClass('.menu-item-has-children')

This method expects a class name, not a selector, so there's no point.

Y
Yuri Esin, 2019-02-23
@Exomode

For starters, it would be nice to understand the basics of the syntax of the language.

$(document).ready(function () {
    if ($(".current-menu-item").hasClass("menu-item-has-children")) {
        console.log("sdfsdg");
        $("#header").css({ height: "282px" });
    }
});

D
Denis, 2015-08-26
@denispost

Something like this:

mask = 64
if mask & (1 << datetime.today().weekday()):
    print("OK")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question