Yes, someone actually did this and I found it running on our server

    • 4am@lemm.ee
      link
      fedilink
      arrow-up
      3
      arrow-down
      2
      ·
      10 months ago

      dayOfWeek is clearly represented by 1-7 in the example, with Sunday being 1.

      So, I guess the answer is “depends on what date library you’re linking against”

        • Zagorath@aussie.zone
          link
          fedilink
          arrow-up
          12
          arrow-down
          1
          ·
          edit-2
          10 months ago

          Both Monday and Sunday are used as the first day of the week with quite some regularity. It’s a completely arbitrary standard no different to "the tenth month is the one called “October”. Or dividing a day into 24 segments which are each broken into 60 smaller segments of 60 even smaller segments. You can’t say either is “wrong” per se.

          Personally, I was brought up learning Sunday is the first day of the week, but at some point decided that was bullshit partly because it’s the week end. But also just from a practical standpoint when looking at a calendar, it’s useful to have the weekend days grouped together.

          • JeffKerman1999@sopuli.xyz
            link
            fedilink
            arrow-up
            19
            ·
            10 months ago

            Ah the same place that uses feet and inches, and puts the month before the day, and cannot read a 24 hour clock?

            • DroneRights [it/its]@lemm.eeOP
              link
              fedilink
              English
              arrow-up
              3
              arrow-down
              1
              ·
              10 months ago

              That’s nice, you can run weekend = dayOfWeek > 5 and then explain to the boss why clients are getting work texts on a sunday

            • DroneRights [it/its]@lemm.eeOP
              link
              fedilink
              English
              arrow-up
              1
              arrow-down
              2
              ·
              edit-2
              10 months ago

              That’s nice, you can run weekend = dayOfWeek > 5 and then explain to the boss why clients are getting work emails on a sunday

          • oolio@feddit.de
            link
            fedilink
            arrow-up
            6
            ·
            10 months ago

            Cron has clearly the superior numbering system, where sunday is both 0 and 7

        • kungen@feddit.nu
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          10 months ago

          Depending on how you’re counting your integers, Monday is 0, being the first day of the week.