Avatar for qucchia0

qucchia0

Member since Oct 2021 • Last active Jan 2022
  • 4 conversations
  • 8 comments

Most recent activity

    • 9 comments
    • 1,217 views
    • 8 comments
    • 1,402 views
    • 9 comments
    • 1,423 views
  • in Bangle.js
    Avatar for qucchia0

    P.S: I'm not saying the function should no longer accept Date objects: that would break previous implementations. Instead, it would accept both Date and integer arguments.

  • in Bangle.js
    Avatar for qucchia0

    I'm developing an app which needs a list of the days of the week, but right now the require("locale").dow() function only accepts a Date object. So I've had to do this:

    let daysOfWeek = [];
    for (let i = 1; i <= 7; i++) {
    
        daysOfWeek.push(require('locale').dow(ne­w Date(1970, 1, i, 0, 0, 0, 0)); // 1/1/1970 was a Sunday
    }
    // Result: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
    

    It seems to me it would be more efficient if the dow() function could accept an integer as well (0 = Sunday, 6 = Saturday) because right now it's just calling getDay() on the argument. That way, the code would be simpler:

    let daysOfWeek = [];
    for (let i = 0; i < 7; i++) {
        daysOfWeek.push(require('locale').dow(i)­;
    }
    

    Does this make sense?

  • in Bangle.js
    Avatar for qucchia0

    Additionally, are there any performance differences between == and ===?

  • in Bangle.js
    Avatar for qucchia0

    Hi, I was wondering if there is any difference in the following lines when in Bangle.js:

    var a = 1;
    let b = 2;
    c = 3;
    
  • in Bangle.js
    Avatar for qucchia0

    Hmm... It works in incognito mode, but not in my regular browser even when hard refreshing. Maybe it could be an extension affecting it.

  • in Bangle.js
    Avatar for qucchia0

    I'm guessing this is because support for the Bangle 2 is being added, and it's causing some bugs:

Actions