From 518f86fcc222c145c837f1e2e83e56128a30ed59 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Fri, 24 Aug 2018 15:04:36 -0300 Subject: Review date and time functions help pages fix some formatting issues Add note and warning on date parsing Mute l10n in some tables with constants Change-Id: I86b4e7651ac89e2d2c8e2e658a8bdfd8f185ab60 Reviewed-on: https://gerrit.libreoffice.org/59582 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos --- source/text/scalc/01/04060102.xhp | 5 + source/text/scalc/01/func_datedif.xhp | 26 ++-- source/text/scalc/01/func_datevalue.xhp | 12 +- source/text/scalc/01/func_day.xhp | 19 ++- source/text/scalc/01/func_days.xhp | 13 +- source/text/scalc/01/func_days360.xhp | 11 +- source/text/scalc/01/func_eastersunday.xhp | 11 +- source/text/scalc/01/func_edate.xhp | 2 + source/text/scalc/01/func_isoweeknum.xhp | 6 +- source/text/scalc/01/func_month.xhp | 15 +-- source/text/scalc/01/func_networkdays.intl.xhp | 20 ++- source/text/scalc/01/func_networkdays.xhp | 3 +- source/text/scalc/01/func_weekday.xhp | 15 +-- source/text/scalc/01/func_weeknum.xhp | 163 +++++++++++++++++++++---- source/text/scalc/01/func_weeknum_ooo.xhp | 13 +- source/text/scalc/01/func_workday.intl.xhp | 20 ++- source/text/scalc/01/func_workday.xhp | 4 +- source/text/scalc/01/func_yearfrac.xhp | 16 +-- 18 files changed, 241 insertions(+), 133 deletions(-) (limited to 'source') diff --git a/source/text/scalc/01/04060102.xhp b/source/text/scalc/01/04060102.xhp index 66cd568d57..850f0a45fb 100644 --- a/source/text/scalc/01/04060102.xhp +++ b/source/text/scalc/01/04060102.xhp @@ -91,7 +91,12 @@ Two digits years In %PRODUCTNAME - Preferences Tools - Options - $[officename] - General you find the area Year (two digits). This sets the period for which two-digit information applies. Note that changes made here have an effect on some of the following functions. +
When entering dates as part of formulas, slashes or dashes used as date separators are interpreted as arithmetic operators. Therefore, dates entered in this format are not recognized as dates and result in erroneous calculations. To keep dates from being interpreted as parts of formulas use the DATE function, for example, DATE(1954;7;20), or place the date in quotation marks and use the ISO 8601 notation, for example, "1954-07-20". Avoid using locale dependent date formats such as "07/20/54", the calculation may produce errors if the document is loaded under different locale settings. +
+
+ Unambiguous conversion is possible for ISO 8601 dates and times in their extended formats with separators. If a #VALUE! error occurs, then unselect Generate #VALUE! error in %PRODUCTNAME - PreferencesTools - Options - %PRODUCTNAME Calc - Formula, button Details... in section "Detailed Calculation Settings", Conversion from text to number list box. +
Functions diff --git a/source/text/scalc/01/func_datedif.xhp b/source/text/scalc/01/func_datedif.xhp index add9419fd8..0f584ead1f 100644 --- a/source/text/scalc/01/func_datedif.xhp +++ b/source/text/scalc/01/func_datedif.xhp @@ -31,7 +31,8 @@ End date is the date until the calculation is carried out. End date must be later, than Start date. Interval is a string, accepted values are "d", "m", "y", "ym", "md" or "yd". -The parsing of Start date and End date strings depends on the Date acceptance patterns defined in %PRODUCTNAME - PreferencesTools - Options - Language Settings - Languages. + + @@ -43,7 +44,7 @@ -"d" +"d" Number of whole days between Start date and End date. @@ -51,7 +52,7 @@ -"m" + "m" Number of whole months between Start date and End date. @@ -59,7 +60,7 @@ -"y" + "y" Number of whole years between Start date and End date. @@ -67,7 +68,7 @@ -"ym" + "ym" Number of whole months when subtracting years from the difference of Start date and End date. @@ -75,7 +76,7 @@ -"md" + "md" Number of whole days when subtracting years and months from the difference of Start date and End date. @@ -83,23 +84,26 @@ -"yd" + "yd" Number of whole days when subtracting years from the difference of Start date and End date.
+ Example Birthday calculation. A man was born on 1974-04-17. Today is 2012-06-13. - -=DATEDIF("1974-04-17";"2012-06-13";"y") yields 38. =DATEDIF("1974-04-17";"2012-06-13";"ym") yields 1. =DATEDIF("1974-04-17";"2012-06-13";"md") yields 27. So he is 38 years, 1 month and 27 days old. +=DATEDIF("1974-04-17";"2012-06-13";"y") yields 38. +=DATEDIF("1974-04-17";"2012-06-13";"ym") yields 1. +=DATEDIF("1974-04-17";"2012-06-13";"md") yields 27. +So he is 38 years, 1 month and 27 days old. -=DATEDIF("1974-04-17";"2012-06-13";"m") yields 457, he has been living for 457 months. +=DATEDIF(DATE(1974,4,17);"2012-06-13";"m") yields 457, he has been living for 457 months. =DATEDIF("1974-04-17";"2012-06-13";"d") yields 13937, he has been living for 13937 days. -=DATEDIF("1974-04-17";"2012-06-13";"yd") yields 57, his birthday was 57 days ago. +=DATEDIF("1974-04-17";DATE(2012;06;13);"yd") yields 57, his birthday was 57 days ago. diff --git a/source/text/scalc/01/func_datevalue.xhp b/source/text/scalc/01/func_datevalue.xhp index 995cd456b0..7bd9df8077 100644 --- a/source/text/scalc/01/func_datevalue.xhp +++ b/source/text/scalc/01/func_datevalue.xhp @@ -1,6 +1,6 @@ - + - - + + DATEVALUE @@ -39,8 +39,10 @@ DATEVALUE("Text") Text is a valid date expression and must be entered with quotation marks. + + Example - =DATEVALUE("1954-07-20") yields 19925. + =DATEVALUE("1954-07-20") yields 19925. - \ No newline at end of file + diff --git a/source/text/scalc/01/func_day.xhp b/source/text/scalc/01/func_day.xhp index cfd64cb1b9..d7cf403b0c 100644 --- a/source/text/scalc/01/func_day.xhp +++ b/source/text/scalc/01/func_day.xhp @@ -1,7 +1,5 @@ - - - - - + DAY @@ -36,11 +32,12 @@ Returns the day of given date value. The day is returned as an integer between 1 and 31. You can also enter a negative date/time value. Syntax DAY(Number) - -Number, as a time value, is a decimal, for which the day is to be returned. -Examples -DAY(1) returns 31 (since $[officename] starts counting at zero from December 30, 1899) -DAY(NOW()) returns the current day. -=DAY(C4) returns 5 if you enter 1901-08-05 in cell C4 (the date value might get formatted differently after you press Enter). +Number is the internal date number. + + +Examples +=DAY(1) returns 31 (since $[officename] starts counting at zero from December 30, 1899) +=DAY(NOW()) returns the current day. +=DAY(C4) returns 5 if you enter 1901-08-05 in cell C4 (the date value might get formatted differently after you press Enter). diff --git a/source/text/scalc/01/func_days.xhp b/source/text/scalc/01/func_days.xhp index 5a16aa042b..a360c42ecd 100644 --- a/source/text/scalc/01/func_days.xhp +++ b/source/text/scalc/01/func_days.xhp @@ -1,7 +1,4 @@ - - - - - - + DAYS @@ -38,8 +33,10 @@ DAYS(Date2; Date1) Date1 is the start date, Date2 is the end date. If Date2 is an earlier date than Date1 the result is a negative number. + + Examples -=DAYS("2010-01-01"; NOW()) returns the number of days from today until January 1, 2010. -=DAYS("1990-10-10";"1980-10-10") returns 3652 days. +=DAYS("2010-01-01"; NOW()) returns the number of days from today until January 1, 2010. +=DAYS("1990-10-10";"1980-10-10") returns 3652 days. diff --git a/source/text/scalc/01/func_days360.xhp b/source/text/scalc/01/func_days360.xhp index d99a8e0e3b..972413e9dd 100644 --- a/source/text/scalc/01/func_days360.xhp +++ b/source/text/scalc/01/func_days360.xhp @@ -1,7 +1,4 @@ - - - - - - + DAYS360 @@ -38,7 +33,9 @@ DAYS360("Date1"; "Date2"; Type) If Date2 is earlier than Date1, the function will return a negative number. The optional argument Type determines the type of difference calculation. If Type = 0 or if the argument is missing, the US method (NASD, National Association of Securities Dealers) is used. If Type <> 0, the European method is used. + + Examples -=DAYS360("2000-01-01";NOW()) returns the number of interest days from January 1, 2000 until today. +=DAYS360("2000-01-01";NOW()) returns the number of interest days from January 1, 2000 until today. diff --git a/source/text/scalc/01/func_eastersunday.xhp b/source/text/scalc/01/func_eastersunday.xhp index b582e1d1d8..4ffc6f5d58 100644 --- a/source/text/scalc/01/func_eastersunday.xhp +++ b/source/text/scalc/01/func_eastersunday.xhp @@ -1,7 +1,4 @@ - - - - - - + EASTERSUNDAY @@ -43,7 +38,7 @@ Pentecost Sunday = EASTERSUNDAY(Year) + 49 Pentecost Monday = EASTERSUNDAY(Year) + 50 Examples -=EASTERSUNDAY(2000) returns 2000-04-23. -EASTERSUNDAY(2000)+49 returns the internal serial number 36688. The result is 2000-06-11. Format the serial date number as a date, for example in the format YYYY-MM-DD. +=EASTERSUNDAY(2000) returns 2000-04-23. +=EASTERSUNDAY(2000)+49 returns the internal serial number 36688. The result is 2000-06-11. Format the serial date number as a date, for example in the format YYYY-MM-DD. diff --git a/source/text/scalc/01/func_edate.xhp b/source/text/scalc/01/func_edate.xhp index 9a1c8e85b2..4ad81b867a 100644 --- a/source/text/scalc/01/func_edate.xhp +++ b/source/text/scalc/01/func_edate.xhp @@ -40,6 +40,8 @@ StartDate is a date. Months is the number of months before (negative) or after (positive) the start date. + + Example What date is one month prior to 2001-03-31? diff --git a/source/text/scalc/01/func_isoweeknum.xhp b/source/text/scalc/01/func_isoweeknum.xhp index e65bfa88f6..6ecc8cd68d 100644 --- a/source/text/scalc/01/func_isoweeknum.xhp +++ b/source/text/scalc/01/func_isoweeknum.xhp @@ -39,8 +39,10 @@ ISOWEEKNUM(Number) Number is the internal date number. + + Examples -=ISOWEEKNUM(DATE(1995;1;1)) returns 52. Week 1 starts on Monday, 1995-01-02. -=ISOWEEKNUM(DATE(1999;1;1)) returns 53. Week 1 starts on Monday, 1999-01-04. +=ISOWEEKNUM(DATE(1995;1;1)) returns 52. Week 1 starts on Monday, 1995-01-02. +=ISOWEEKNUM(DATE(1999;1;1)) returns 53. Week 1 starts on Monday, 1999-01-04. diff --git a/source/text/scalc/01/func_month.xhp b/source/text/scalc/01/func_month.xhp index 00ee244f96..4d23f5ba82 100644 --- a/source/text/scalc/01/func_month.xhp +++ b/source/text/scalc/01/func_month.xhp @@ -1,7 +1,4 @@ - - - - - - + MONTH @@ -37,9 +32,11 @@ Syntax MONTH(Number) -Number, as a time value, is a decimal for which the month is to be returned. + Number is the internal date number. + + Examples -=MONTH(NOW()) returns the current month. -=MONTH(C4) returns 7 if you enter 2000-07-07 to cell C4 (that date value might get formatted differently after you press Enter). +=MONTH(NOW()) returns the current month. +=MONTH(C4) returns 7 if you enter 2000-07-07 to cell C4 (that date value might get formatted differently after you press Enter). diff --git a/source/text/scalc/01/func_networkdays.intl.xhp b/source/text/scalc/01/func_networkdays.intl.xhp index 69cff76c8b..77f272f514 100644 --- a/source/text/scalc/01/func_networkdays.intl.xhp +++ b/source/text/scalc/01/func_networkdays.intl.xhp @@ -26,34 +26,29 @@ - -
NETWORKDAYS.INTL function - - NETWORKDAYS.INTL Returns the number of workdays between a start date and an end date. There are options to define weekend days and holidays. The optional weekend parameter (or a string) can be used to define the weekend days (or the non-working days in each week). Also, optionally, the user can define a holiday list. The weekend days and user-defined holidays are not counted as working days.
- Syntax -NETWORKDAYS.INTL(StartDate; EndDate; Weekend; Holidays) +NETWORKDAYS.INTL(StartDate; EndDate; Weekend; Holidays) StartDate is the date from when the calculation is carried out. If the start date is a workday, the day is included in the calculation. EndDate is the date up until when the calculation is carried out. If the end date is a workday, the day is included in the calculation. - + + Example How many workdays fall between December 15, 2016 and January 14, 2017? Let the start date be located in C3 and the end date in D3. Cells F3 to J3 contain five (5) holidays for Christmas and New Year in date format: December 24, 2016; December 25, 2016; December 26, 2016; December 31, 2016; and January 1, 2017. -=NETWORKDAYS.INTL(C3;D3;;F3:J3) returns 21 workdays with default for weekend days. -=NETWORKDAYS.INTL(C3;D3;11;F3:J3) returns 24 workdays with Sunday only weekends. +=NETWORKDAYS.INTL(C3;D3;;F3:J3) returns 21 workdays with default for weekend days. +=NETWORKDAYS.INTL(C3;D3;11;F3:J3) returns 24 workdays with Sunday only weekends. Alternatively, use the weekend string “0000001” to define Sunday as the non-working day of every week. -=NETWORKDAYS.INTL(C3;D3;“0000001”;F3:J3) returns 24 workdays with Sunday only weekend. +=NETWORKDAYS.INTL(C3;D3;“0000001”;F3:J3) returns 24 workdays with Sunday only weekend. The function can be used without the two optional parameters – weekday and holidays – by leaving them out: -=NETWORKDAYS.INTL(C3;D3) gives 22 working days. - +=NETWORKDAYS.INTL(C3;D3) gives 22 working days.
NETWORKDAYS WORKDAY.INTL @@ -61,5 +56,4 @@ Date functions
-
diff --git a/source/text/scalc/01/func_networkdays.xhp b/source/text/scalc/01/func_networkdays.xhp index b87f796fed..3490b00a8d 100644 --- a/source/text/scalc/01/func_networkdays.xhp +++ b/source/text/scalc/01/func_networkdays.xhp @@ -42,7 +42,8 @@ EndDate is the date up until when the calculation is carried out. If the end date is a workday, the day is included in the calculation. Holidays is an optional list of holidays. These are non-working days. Enter a cell range in which the holidays are listed individually. Workdays is an optional list of number values defining standard work week. This list starts by Sunday, workdays are indicated by zero and non-working days by non-zero value. - + + Examples How many workdays fall between 2001-12-15 and 2002-01-15? The start date is located in C3 and the end date in D3. Cells F3 to J3 contain the following Christmas and New Year holidays: "2001-12-24", "2001-12-25", "2001-12-26", "2001-12-31", "2002-01-01". =NETWORKDAYS(C3;D3;F3:J3) returns 17 workdays. diff --git a/source/text/scalc/01/func_weekday.xhp b/source/text/scalc/01/func_weekday.xhp index 30012968c3..c9046cdaee 100644 --- a/source/text/scalc/01/func_weekday.xhp +++ b/source/text/scalc/01/func_weekday.xhp @@ -134,14 +134,15 @@ These values apply only to the standard date format that you select under %PRODUCTNAME - Preferences Tools - Options- %PRODUCTNAME Calc - Calculate. - + + Examples -=WEEKDAY("2000-06-14") returns 4 (the Type parameter is missing, therefore the standard count is used. The standard count starts with Sunday as day number 1. June 14, 2000 was a Wednesday and therefore day number 4). -=WEEKDAY("1996-07-24";2) returns 3 (the Type parameter is 2, therefore Monday is day number 1. July 24, 1996 was a Wednesday and therefore day number 3). -=WEEKDAY("1996-07-24";1) returns 4 (the Type parameter is 1, therefore Sunday is day number 1. July 24, 1996 was a Wednesday and therefore day number 4). -=WEEKDAY("2017-05-02";14) returns 6 (the Type parameter is 14, therefore Thursday is day number 1. May 2, 2017 was a Tuesday and therefore day number 6) -=WEEKDAY(NOW()) returns the number of the current day. -To obtain a function indicating whether a day in A1 is a business day, use the IF and WEEKDAY functions as follows:
IF(WEEKDAY(A1;2)<6;"Business day";"Weekend")
+=WEEKDAY("2000-06-14") returns 4 (the Type parameter is missing, therefore the standard count is used. The standard count starts with Sunday as day number 1. June 14, 2000 was a Wednesday and therefore day number 4). +=WEEKDAY("1996-07-24";2) returns 3 (the Type parameter is 2, therefore Monday is day number 1. July 24, 1996 was a Wednesday and therefore day number 3). +=WEEKDAY("1996-07-24";1) returns 4 (the Type parameter is 1, therefore Sunday is day number 1. July 24, 1996 was a Wednesday and therefore day number 4). +=WEEKDAY("2017-05-02";14) returns 6 (the Type parameter is 14, therefore Thursday is day number 1. May 2, 2017 was a Tuesday and therefore day number 6) +=WEEKDAY(NOW()) returns the number of the current day. +To obtain a function indicating whether a day in A1 is a business day, use the IF and WEEKDAY functions as follows:
IF(WEEKDAY(A1;2)<6;"Business day";"Weekend")
diff --git a/source/text/scalc/01/func_weeknum.xhp b/source/text/scalc/01/func_weeknum.xhp index 76ff5ac2c2..35b56ff2d6 100644 --- a/source/text/scalc/01/func_weeknum.xhp +++ b/source/text/scalc/01/func_weeknum.xhp @@ -1,7 +1,4 @@ - - - - - - + WEEKNUM @@ -35,29 +30,151 @@ WEEKNUM calculates the week number of the year for the internal date value as defined in ODF OpenFormula and compatible with other spreadsheet applications. Supported are two week numbering systems: -System 1: The week containing January 1 is the first week of the year, and is numbered week 1. -System 2: The week containing the first Thursday of the year is the first week of the year, and is numbered week 1. That means that week number 1 of any year is the week that contains January 4th. ISO 8601 defines this system and that the week starts on Monday. + + + + System + + + Description + + + + + System 1 + + + The week containing January 1 is the first week of the year, and is numbered week 1. + + + + + System 2 + + + The week containing the first Thursday of the year is the first week of the year, and is numbered week 1. That means that week number 1 of any year is the week that contains January 4th. ISO 8601 defines this system and that the week starts on Monday. + + +
Syntax WEEKNUM(Number [; Mode]) Number is the internal date number. Mode sets the start of the week and the week numbering system. This parameter is optional, if omitted the default value is 1. -1 = Sunday, system 1 -2 = Monday, system 1 -11 = Monday, system 1 -12 = Tuesday, system 1 -13 = Wednesday, system 1 -14 = Thursday, system 1 -15 = Friday, system 1 -16 = Saturday, system 1 -17 = Sunday, system 1 -21 = Monday, system 2 (ISO 8601) -150 = Monday, system 2 (ISO 8601, for interoperability with Gnumeric) + + + + System + + + Mode + + + Day of the week + + + + + System 1 + + + 1 + + + Sunday + + + + + 2 + + + Monday + + + + + 11 + + + Monday + + + + + 12 + + + Tuesday + + + + + 13 + + + Wednesday + + + + + 14 + + + Thursday + + + + + 15 + + + Friday + + + + + 16 + + + Saturday + + + + + 17 + + + Sunday + + + + + System 2 + + + 21 + + + Monday (ISO 8601) + + + + + 150 + + + (ISO 8601, for interoperability with Gnumeric) + + +
+ + Examples -=WEEKNUM(DATE(1995;1;1);1) returns 1 -=WEEKNUM(DATE(1995;1;1);2) returns 52. If the week starts on Monday, Sunday belongs to the last week of the previous year. -=WEEKNUM(DATE(1995;1;1);21) returns 52. Week 1 starts on Monday, 1995-01-02. -=WEEKNUM(DATE(1999;1;1);21) returns 53. Week 1 starts on Monday, 1999-01-04. +=WEEKNUM(DATE(1995;1;1);1) returns 1 +=WEEKNUM(DATE(1995;1;1);2) returns 52. If the week starts on Monday, Sunday belongs to the last week of the previous year. +=WEEKNUM(DATE(1995;1;1);21) returns 52. Week 1 starts on Monday, 1995-01-02. +=WEEKNUM(DATE(1999;1;1);21) returns 53. Week 1 starts on Monday, 1999-01-04.
diff --git a/source/text/scalc/01/func_weeknum_ooo.xhp b/source/text/scalc/01/func_weeknum_ooo.xhp index 8beea9ca9c..4c02c7d1f0 100644 --- a/source/text/scalc/01/func_weeknum_ooo.xhp +++ b/source/text/scalc/01/func_weeknum_ooo.xhp @@ -1,7 +1,4 @@ - - - - - - + WEEKNUM_OOO @@ -44,8 +39,10 @@ 1 = Sunday 2 = Monday (ISO 8601) any other value = Monday (ISO 8601) + + Examples -=WEEKNUM_OOO(DATE(1995;1;1);1) returns 1 -=WEEKNUM_OOO(DATE(1995;1;1);2) returns 52. Week 1 starts on Monday, 1995-01-02. +=WEEKNUM_OOO(DATE(1995;1;1);1) returns 1 +=WEEKNUM_OOO(DATE(1995;1;1);2) returns 52. Week 1 starts on Monday, 1995-01-02. diff --git a/source/text/scalc/01/func_workday.intl.xhp b/source/text/scalc/01/func_workday.intl.xhp index 635dc3479f..63451fe5a7 100644 --- a/source/text/scalc/01/func_workday.intl.xhp +++ b/source/text/scalc/01/func_workday.intl.xhp @@ -24,10 +24,7 @@ /text/scalc/01/func_workday.intl.xhp - - -
WORKDAY.INTL function @@ -40,25 +37,25 @@
Syntax -WORKDAY.INTL(StartDate; Days; Weekend; Holidays) +WORKDAY.INTL(StartDate; Days; Weekend; Holidays) StartDate is the date from when the calculation is carried out. If the start date is a workday, the day is included in the calculation. This is required. Days is the number of workdays. Positive value for a result after the start date, negative value for a result before the start date. - + + Example What date comes 20 workdays after December 13, 2016? Enter the start date in C3 and the number of workdays in D3. The weekend parameter (number) may be left blank or defined as 1 for default weekend (non-working days) – Saturday and Sunday. Cells F3 to J3 contain five (5) holidays for Christmas and New Year in date format: December 24, 2016; December 25, 2016; December 26, 2016; December 31, 2016; and January 1, 2017. -=WORKDAY.INTL(C3;D3;;F3:J3) returns January 11, 2017 in the result cell, say D6 (use date format for the cell). +=WORKDAY.INTL(C3;D3;;F3:J3) returns January 11, 2017 in the result cell, say D6 (use date format for the cell). To define Friday and Saturday as weekend days, use the weekend parameter 7. -=WORKDAY.INTL(C3;D3;7;F3:J3) returns January 15, 2017 with weekend parameter 7. +=WORKDAY.INTL(C3;D3;7;F3:J3) returns January 15, 2017 with weekend parameter 7. To define Sunday only the weekend day, use the weekend parameter 11. -=WORKDAY.INTL(C3;D3;11;F3:J3) returns January 9, 2017. +=WORKDAY.INTL(C3;D3;11;F3:J3) returns January 9, 2017. Alternatively, use the weekend string "0000001" for Sunday only weekend. -=WORKDAY.INTL(C3;D3;"0000001";F3:J3) returns January 9, 2017. +=WORKDAY.INTL(C3;D3;"0000001";F3:J3) returns January 9, 2017. The function can be used without the two optional parameters – Weekday and Holidays – by leaving them out: -=WORKDAY.INTL(C3;D3) gives the result: January 10, 2017. - +=WORKDAY.INTL(C3;D3) gives the result: January 10, 2017.
NETWORKDAYS NETWORKDAYS.INTL @@ -66,5 +63,4 @@ Date functions
-
diff --git a/source/text/scalc/01/func_workday.xhp b/source/text/scalc/01/func_workday.xhp index e8dc7e2d2e..a6038fa117 100644 --- a/source/text/scalc/01/func_workday.xhp +++ b/source/text/scalc/01/func_workday.xhp @@ -42,9 +42,11 @@ Days is the number of workdays. Positive value for a result after the start date, negative value for a result before the start date. Holidays is a list of optional holidays. These are non-working days. Enter a cell range in which the holidays are listed individually. + + Example What date came 17 workdays after 1 December 2001? Enter the start date "2001-12-01" in C3 and the number of workdays in D3. Cells F3 to J3 contain the following Christmas and New Year holidays: "2001-12-24", "2001-12-25", "2001-12-26", "2001-12-31", "2002-01-01". -=WORKDAY(C3;D3;F3:J3) returns 2001-12-28. Format the serial date number as a date, for example in the format YYYY-MM-DD.UFI: fixed #i30213# +=WORKDAY(C3;D3;F3:J3) returns 2001-12-28. Format the serial date number as a date, for example in the format YYYY-MM-DD.UFI: fixed #i30213#
NETWORKDAYS NETWORKDAYS.INTL diff --git a/source/text/scalc/01/func_yearfrac.xhp b/source/text/scalc/01/func_yearfrac.xhp index fc84af4941..8fd42e02d4 100644 --- a/source/text/scalc/01/func_yearfrac.xhp +++ b/source/text/scalc/01/func_yearfrac.xhp @@ -43,7 +43,7 @@ Basis (optional) is chosen from a list of options and indicates how the year is to be calculated. - + Basis @@ -52,7 +52,7 @@ -0 or missing +0 or missing US method (NASD), 12 months of 30 days each @@ -60,7 +60,7 @@ -1 + 1 Exact number of days in months, exact number of days in year @@ -68,7 +68,7 @@ -2 + 2 Exact number of days in month, year has 360 days @@ -76,7 +76,7 @@ -3 + 3 Exact number of days in month, year has 365 days @@ -84,7 +84,7 @@ -4 + 4 European method, 12 months of 30 days each @@ -92,8 +92,10 @@
+ + Example What fraction of the year 2008 lies between 2008-01-01 and 2008-07-01? -=YEARFRAC("2008-01-01"; "2008-07-01";0) returns 0.50. +=YEARFRAC("2008-01-01"; "2008-07-01";0) returns 0.50.
-- cgit