Uploaded image for project: 'OASIS Open Document Format for Office Applications (OpenDocument) TC'
  1. OASIS Open Document Format for Office Applications (OpenDocument) TC
  2. OFFICE-2913

6.10.14 NETWORKDAYS and 6.10.22 WORKDAY inconsistency

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Applied
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: ODF 1.2 CD 05
    • Fix Version/s: ODF 1.2 CD 06
    • Component/s: OpenFormula
    • Labels:
      None
    • Proposal:
      Hide

      Rewrite:
      6.10.14 NETWORKDAYS
      Summary: Returns the whole number of work days between two dates.
      Syntax: NETWORKDAYS( DateParam Date1 ; DateParam Date2 [ ; [ DateSequence holidays ] [ ;
      NumberSequence workdays ] ] )
      Returns: Number
      Constraints: None
      Semantics: Returns the whole number of days between two dates, ignoring weekends.
      Work days are defined as non-weekend, non-holiday days. By default, weekends are Saturdays
      and Sundays and there are no holidays.
      The optional 3rd parameter Holidays can be used to specify a list of dates to be treated as
      holidays. Note that this parameter can be omitted as an empty parameter (two consecutive ;;
      semicolons) to be able to pass the set of Workdays without Holidays.
      The optional 4th parameter Workdays can be used to specify a different definition for the standard
      work week by passing in a list of numbers which define which days of the week are
      workdays (indicated by 0) or not (indicated by non-zero) in order Sunday, Monday,...,Saturday. So, the default definition of the work week excludes Saturday and Sunday and is:

      {1;0;0;0;0;0;1}

      . To define the workweek as excluding Friday and Saturday, the third parameter
      would be:

      {0;0;0;0;0;1;1}

      .

      Similarly for WORKDAYS

      Show
      Rewrite: 6.10.14 NETWORKDAYS Summary: Returns the whole number of work days between two dates. Syntax: NETWORKDAYS( DateParam Date1 ; DateParam Date2 [ ; [ DateSequence holidays ] [ ; NumberSequence workdays ] ] ) Returns: Number Constraints: None Semantics: Returns the whole number of days between two dates, ignoring weekends. Work days are defined as non-weekend, non-holiday days. By default, weekends are Saturdays and Sundays and there are no holidays. The optional 3rd parameter Holidays can be used to specify a list of dates to be treated as holidays. Note that this parameter can be omitted as an empty parameter (two consecutive ;; semicolons) to be able to pass the set of Workdays without Holidays. The optional 4th parameter Workdays can be used to specify a different definition for the standard work week by passing in a list of numbers which define which days of the week are workdays (indicated by 0) or not (indicated by non-zero) in order Sunday, Monday,...,Saturday. So, the default definition of the work week excludes Saturday and Sunday and is: {1;0;0;0;0;0;1} . To define the workweek as excluding Friday and Saturday, the third parameter would be: {0;0;0;0;0;1;1} . Similarly for WORKDAYS
    • Resolution:
      Hide

      Rewrite:

      6.10.14 NETWORKDAYS
      Summary: Returns the whole number of work days between two dates.
      Syntax: NETWORKDAYS( DateParam Date1 ; DateParam Date2 [ ; [ DateSequence Holidays ] [ ; NumberSequence Workdays ] ] )
      Returns: Number
      Constraints: None
      Semantics: Returns the whole number of days between two dates, ignoring weekends.
      Work days are defined as non-weekend, non-holiday days. By default, weekends are Saturdays
      and Sundays and there are no holidays.
      The optional 3rd parameter Holidays can be used to specify a list of dates to be treated as
      holidays. Note that this parameter can be omitted as an empty parameter (two consecutive ;;
      semicolons) to be able to pass the set of Workdays without Holidays.
      The optional 4th parameter Workdays can be used to specify a different definition for the standard
      work week by passing in a list of numbers which define which days of the week are
      workdays (indicated by 0) or not (indicated by non-zero) in order Sunday, Monday,...,Saturday.
      So, the default definition of the work week excludes Saturday and Sunday and is:

      {1;0;0;0;0;0;1}. To define the work week as excluding Friday and Saturday, the third parameter
      would be: {0;0;0;0;0;1;1}.

      6.10.22 WORKDAY
      Summary: Returns the date serial number which is a specified number of work days before or after an
      input date.
      Syntax: WORKDAY( DateParam Date ; Number Offset [ ; [ DateSequence Holidays ] [ ; NumberSequence Workdays ] ] )
      Returns: DateTime
      Constraints: None
      Semantics: Returns the date serial number for the day that is offset from the input Date parameter
      by the number of work days specified in the Offset parameter. If Offset is negative, the offset will
      return a date prior to Date. If Offset is positive, a date later Date is returned. If Offset is zero, then
      Date is returned.
      Work days are defined as non-weekend, non-holiday days. By default, weekends are Saturdays
      and Sundays and there are no holidays.
      The optional 3rd parameter Holidays can be used to specify a list of dates to be treated as holidays.
      Note that this parameter can be omitted as an empty parameter (two consecutive ;; semicolons) to
      be able to pass the set of Workdays without Holidays.
      The optional 4th parameter Workdays can be used to specify a different definition for the standard
      work week by passing in a list of numbers which define which days of the week are workdays (indicated by 0)
      or not (indicated by non-zero) in order Sunday, Monday,...,Saturday.
      If all seven numbers in Workdays are non-zero and Offset is also non-zero, WORKDAY returns an error.
      Note: The default definition of the work week that excludes Saturday and Sunday and is:{1;0;0;0;0;0;1}

      . To define the work week as excluding Friday and Saturday, the third parameter
      would be:

      {0;0;0;0;0;1;1}

      .

      Show
      Rewrite: 6.10.14 NETWORKDAYS Summary: Returns the whole number of work days between two dates. Syntax: NETWORKDAYS( DateParam Date1 ; DateParam Date2 [ ; [ DateSequence Holidays ] [ ; NumberSequence Workdays ] ] ) Returns: Number Constraints: None Semantics: Returns the whole number of days between two dates, ignoring weekends. Work days are defined as non-weekend, non-holiday days. By default, weekends are Saturdays and Sundays and there are no holidays. The optional 3rd parameter Holidays can be used to specify a list of dates to be treated as holidays. Note that this parameter can be omitted as an empty parameter (two consecutive ;; semicolons) to be able to pass the set of Workdays without Holidays. The optional 4th parameter Workdays can be used to specify a different definition for the standard work week by passing in a list of numbers which define which days of the week are workdays (indicated by 0) or not (indicated by non-zero) in order Sunday, Monday,...,Saturday. So, the default definition of the work week excludes Saturday and Sunday and is: {1;0;0;0;0;0;1}. To define the work week as excluding Friday and Saturday, the third parameter would be: {0;0;0;0;0;1;1}. 6.10.22 WORKDAY Summary: Returns the date serial number which is a specified number of work days before or after an input date. Syntax: WORKDAY( DateParam Date ; Number Offset [ ; [ DateSequence Holidays ] [ ; NumberSequence Workdays ] ] ) Returns: DateTime Constraints: None Semantics: Returns the date serial number for the day that is offset from the input Date parameter by the number of work days specified in the Offset parameter. If Offset is negative, the offset will return a date prior to Date. If Offset is positive, a date later Date is returned. If Offset is zero, then Date is returned. Work days are defined as non-weekend, non-holiday days. By default, weekends are Saturdays and Sundays and there are no holidays. The optional 3rd parameter Holidays can be used to specify a list of dates to be treated as holidays. Note that this parameter can be omitted as an empty parameter (two consecutive ;; semicolons) to be able to pass the set of Workdays without Holidays. The optional 4th parameter Workdays can be used to specify a different definition for the standard work week by passing in a list of numbers which define which days of the week are workdays (indicated by 0) or not (indicated by non-zero) in order Sunday, Monday,...,Saturday. If all seven numbers in Workdays are non-zero and Offset is also non-zero, WORKDAY returns an error. Note: The default definition of the work week that excludes Saturday and Sunday and is:{1;0;0;0;0;0;1} . To define the work week as excluding Friday and Saturday, the third parameter would be: {0;0;0;0;0;1;1} .

      Description

      In 6.10.14 NETWORKDAYS and 6.10.22 WORKDAY the last argument is specified as [ ;LogicalSequence workdays ] .
      In 6.10.14 it states that

      {1;0;0;0;0;0;1} is the default and an explanatory example gives {0;0;0;0;0;1;1}. The same is stated in 6.10.22 in a Note.
      {1;0;0;0;0;0;1}

      and

      {0;0;0;0;0;1;1}

      are not LogicalSequences. We should give Logical sequences here, ie.

      {TRUE();FALSE();FALSE();FALSE();FALSE();FALSE();TRUE()}

      and

      {FALSE();FALSE();FALSE();FALSE();FALSE();TRUE();TRUE()}

      .

        Attachments

          Activity

            People

            • Assignee:
              aguelzow Andreas Guelzow (Inactive)
              Reporter:
              aguelzow Andreas Guelzow (Inactive)
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: