Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-23673

PySpark dayofweek does not conform with ISO 8601

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Incomplete
    • 2.3.0
    • None
    • PySpark, Spark Core

    Description

      The new function dayofweek, that returns 1 = Sunday and 7 for Saturday, does not conform with ISO 8601, that states that the first day of the week is Monday, so 1 = Monday and 7 = Sunday. This behavior is also different from Pandas, that uses 0 = Monday and 6 = Sunday, but pandas is at least consistent with the ordering of ISO 8601.

      https://en.wikipedia.org/wiki/ISO_8601#Week_dates

      (Also reported by Antonio Pedro Vieira (aps.vieira95@gmail.com))

      Attachments

        Activity

          People

            Unassigned Unassigned
            ispmarin Ivan SPM
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: