From efc2eba6081f95dbf83ea1776a563bbddaa13f68 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Sat, 28 Dec 2019 13:52:39 -0300 Subject: [PATCH] tdf#127477 Incomplete description of date & time functions + case of YEAR() + some refactoring + mention ODFF standard where it applies. Change-Id: I91c2a7f8cc799d99af8380f228678ef0e49bdd83 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/85926 Tested-by: Jenkins Reviewed-by: Olivier Hallot --- source/text/scalc/01/04060102.xhp | 147 ++++-------------- source/text/scalc/01/func_date.xhp | 15 +- source/text/scalc/01/func_datedif.xhp | 11 +- source/text/scalc/01/func_datevalue.xhp | 8 +- source/text/scalc/01/func_day.xhp | 9 +- source/text/scalc/01/func_days.xhp | 8 +- source/text/scalc/01/func_days360.xhp | 8 +- source/text/scalc/01/func_eastersunday.xhp | 7 +- source/text/scalc/01/func_edate.xhp | 15 +- source/text/scalc/01/func_eomonth.xhp | 16 +- source/text/scalc/01/func_hour.xhp | 17 +- source/text/scalc/01/func_isoweeknum.xhp | 17 +- source/text/scalc/01/func_minute.xhp | 15 +- source/text/scalc/01/func_month.xhp | 8 +- .../text/scalc/01/func_networkdays.intl.xhp | 5 +- source/text/scalc/01/func_networkdays.xhp | 7 +- source/text/scalc/01/func_now.xhp | 15 +- source/text/scalc/01/func_second.xhp | 15 +- source/text/scalc/01/func_time.xhp | 15 +- source/text/scalc/01/func_timevalue.xhp | 8 +- source/text/scalc/01/func_today.xhp | 15 +- source/text/scalc/01/func_weekday.xhp | 13 +- source/text/scalc/01/func_weeknum.xhp | 38 +++-- source/text/scalc/01/func_weeknum_ooo.xhp | 9 +- source/text/scalc/01/func_weeknumadd.xhp | 16 +- source/text/scalc/01/func_workday.intl.xhp | 5 +- source/text/scalc/01/func_workday.xhp | 11 +- source/text/scalc/01/func_year.xhp | 19 +-- source/text/scalc/01/func_yearfrac.xhp | 37 +++-- 29 files changed, 228 insertions(+), 301 deletions(-) diff --git a/source/text/scalc/01/04060102.xhp b/source/text/scalc/01/04060102.xhp index 3f0acce19c..2e1fd17996 100644 --- a/source/text/scalc/01/04060102.xhp +++ b/source/text/scalc/01/04060102.xhp @@ -26,15 +26,12 @@ - date and time functions functions; date & time Function Wizard; date & time - - -

Date & Time Functions

+

Date & Time Functions

These spreadsheet functions are used for inserting and editing dates and times.
@@ -46,6 +43,7 @@
$[officename] internally handles a date/time value as a numerical value. If you assign the numbering format "Number" to a date or time value, it is converted to a number. For example, 01/01/2000 12:00 PM, converts to 36526.5. The value preceding the decimal point corresponds to the date; the value following the decimal point corresponds to the time. If you do not want to see this type of numerical date or time representation, change the number format (date or time) accordingly. To do this, select the cell containing the date or time value, call its context menu and select Format Cells. The Numbers tab page contains the functions for defining the number format. +

Date base for day zero

Dates are calculated as offsets from a starting day zero. You can set the day zero to be one of the following: @@ -83,7 +81,7 @@ - +
Choose %PRODUCTNAME - Preferences Tools - Options - %PRODUCTNAME Calc - Calculate to select the date base. When you copy and paste cells containing date values between different spreadsheets, both spreadsheet documents must be set to the same date base. If date bases differ, the displayed date values will change! @@ -101,124 +99,41 @@ Time zone information is not used in Date and Time functions and cells.

Functions

- +
+ -
+ + + + + + + + + + + + + + + + + + + + + + + + -
- -
+ +
-
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- diff --git a/source/text/scalc/01/func_date.xhp b/source/text/scalc/01/func_date.xhp index 7ab7182e11..bb05e1f800 100644 --- a/source/text/scalc/01/func_date.xhp +++ b/source/text/scalc/01/func_date.xhp @@ -1,7 +1,4 @@ - - - - - - + DATE @@ -31,9 +26,10 @@ DATE function -DATE - +

DATE +

This function calculates a date specified by year, month, day and displays it in the cell's formatting. The default format of a cell containing the DATE function is the date format, but you can format the cells with any other number format. + DATE(Year; Month; Day) @@ -47,5 +43,8 @@ =DATE(00;1;31) yields 1/31/00 if the cell format setting is MM/DD/YY. +
+ +
diff --git a/source/text/scalc/01/func_datedif.xhp b/source/text/scalc/01/func_datedif.xhp index 3d56e4a286..d6a1cb4650 100644 --- a/source/text/scalc/01/func_datedif.xhp +++ b/source/text/scalc/01/func_datedif.xhp @@ -1,7 +1,4 @@ - - - - - - + EDATE @@ -31,9 +26,10 @@ EDATE function -EDATE - +

EDATE +

The result is a date which is a number of months away from the start date. Only months are considered; days are not used for calculation. + EDATE(StartDate; Months) @@ -46,5 +42,8 @@ What date is one month prior to 2001-03-31? =EDATE("2001-03-31";-1) returns the serial number 36950. Formatted as a date, this is 2001-02-28. +
+ +
diff --git a/source/text/scalc/01/func_eomonth.xhp b/source/text/scalc/01/func_eomonth.xhp index 19f98584be..186c4e9488 100644 --- a/source/text/scalc/01/func_eomonth.xhp +++ b/source/text/scalc/01/func_eomonth.xhp @@ -1,7 +1,4 @@ - - - - - - + EOMONTH @@ -31,9 +26,10 @@ EOMONTH function -EOMONTH - +

EOMONTH +

Returns the date of the last day of a month which falls months away from the start date. + EOMONTH(StartDate; Months) @@ -45,6 +41,8 @@ =EOMONTH(DATE(2001;9;14);6) returns the serial number 37346. Formatted as a date, this is 2002-03-31. =EOMONTH("2001-09-14";6) works as well. If the date is given as string, it has to be in ISO format. - +
+ +
diff --git a/source/text/scalc/01/func_hour.xhp b/source/text/scalc/01/func_hour.xhp index d4409245e5..9936d29149 100644 --- a/source/text/scalc/01/func_hour.xhp +++ b/source/text/scalc/01/func_hour.xhp @@ -1,7 +1,4 @@ - - - - - - + HOUR @@ -31,9 +26,10 @@ HOUR function -HOUR - +

HOUR +

Returns the hour for a given time value. The hour is returned as an integer between 0 and 23. + HOUR(Number) @@ -43,7 +39,8 @@ =HOUR(NOW()) returns the current hour =HOUR(C4) returns 17 if the contents of C4 = 17:20:00. - -YEAR, NOW, MINUTE, MONTH, DAY, WEEKDAY. +
+ +
diff --git a/source/text/scalc/01/func_isoweeknum.xhp b/source/text/scalc/01/func_isoweeknum.xhp index 9556aecd4b..96f58c8666 100644 --- a/source/text/scalc/01/func_isoweeknum.xhp +++ b/source/text/scalc/01/func_isoweeknum.xhp @@ -1,7 +1,4 @@ - - - - - - + ISOWEEKNUM @@ -31,11 +26,12 @@ ISOWEEKNUM function -ISOWEEKNUM - +

ISOWEEKNUM +

ISOWEEKNUM calculates the week number of the year for the internal date value. -The International Standard ISO 8601 has decreed that Monday shall be the first day of the week. A week that lies partly in one year and partly in another is assigned a number in the year in which most of its days lie. That means that week number 1 of any year is the week that contains the January 4th. +The International Standard ISO 8601 has decreed that Monday shall be the first day of the week. A week that lies partly in one year and partly in another is assigned a number in the year in which most of its days lie. That means that week number 1 of any year is the week that contains the January 4th. + ISOWEEKNUM(Number) @@ -45,5 +41,8 @@ =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_minute.xhp b/source/text/scalc/01/func_minute.xhp index 91c4cb1c09..1bea6607f4 100644 --- a/source/text/scalc/01/func_minute.xhp +++ b/source/text/scalc/01/func_minute.xhp @@ -1,7 +1,4 @@ - - - - - - + MINUTE @@ -31,9 +26,10 @@ MINUTE function -MINUTE - +

MINUTE +

Calculates the minute for an internal time value. The minute is returned as a number between 0 and 59. + MINUTE(Number) @@ -45,5 +41,8 @@ =MINUTE(8.9999) returns 59 =MINUTE(NOW()) returns the current minute value. +
+ +
diff --git a/source/text/scalc/01/func_month.xhp b/source/text/scalc/01/func_month.xhp index 038db6f654..9ae8ce5f5e 100644 --- a/source/text/scalc/01/func_month.xhp +++ b/source/text/scalc/01/func_month.xhp @@ -26,9 +26,10 @@ MONTH function -MONTH - +

MONTH +

Returns the month for the given date value. The month is returned as an integer between 1 and 12. + MONTH(Number) @@ -38,5 +39,8 @@ =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 5df0a4556a..6433879244 100644 --- a/source/text/scalc/01/func_networkdays.intl.xhp +++ b/source/text/scalc/01/func_networkdays.intl.xhp @@ -51,10 +51,7 @@ 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.
- - - -Date functions +
diff --git a/source/text/scalc/01/func_networkdays.xhp b/source/text/scalc/01/func_networkdays.xhp index f22da61b03..19527b6f53 100644 --- a/source/text/scalc/01/func_networkdays.xhp +++ b/source/text/scalc/01/func_networkdays.xhp @@ -37,6 +37,7 @@

NETWORKDAYS

Returns the number of workdays between a start date and an end date. Holidays can be deducted. + NETWORKDAYS(StartDate; EndDate; Holidays; Workdays) 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. @@ -51,11 +52,7 @@ How many workdays fall between September 12nd and 25th in 2016 if only Mondays, Tuesdays and Wednesdays are considered as workdays? =NETWORKDAYS(DATE(2016;9;12); DATE(2016;9;25); ; {1;0;0;0;1;1;1}) returns 6 workdays.
- - - -Date functions +
-
diff --git a/source/text/scalc/01/func_now.xhp b/source/text/scalc/01/func_now.xhp index 1d241fb8cb..fbb84d2ed1 100644 --- a/source/text/scalc/01/func_now.xhp +++ b/source/text/scalc/01/func_now.xhp @@ -1,7 +1,4 @@ - - - - - - + NOW @@ -31,14 +26,18 @@ NOW function -NOW - +

NOW +

Returns the computer system date and time. The value is updated when you recalculate the document or each time a cell value is modified. + NOW() NOW is a function without arguments. =NOW()-A1 returns the difference between the date in A1 and now. Format the result as a number. +
+ +
diff --git a/source/text/scalc/01/func_second.xhp b/source/text/scalc/01/func_second.xhp index a51a4801b4..0baee1eed5 100644 --- a/source/text/scalc/01/func_second.xhp +++ b/source/text/scalc/01/func_second.xhp @@ -1,7 +1,4 @@ - - - - - - + SECOND @@ -31,9 +26,10 @@ SECOND function -SECOND - +

SECOND +

Returns the second for the given time value. The second is given as an integer between 0 and 59. + SECOND(Number) @@ -43,5 +39,8 @@ =SECOND(NOW()) returns the current second =SECOND(C4) returns 17 if contents of C4 = 12:20:17. +
+ +
diff --git a/source/text/scalc/01/func_time.xhp b/source/text/scalc/01/func_time.xhp index de55b8a666..1aac1737ce 100644 --- a/source/text/scalc/01/func_time.xhp +++ b/source/text/scalc/01/func_time.xhp @@ -1,7 +1,4 @@ - - - - - - + TIME @@ -31,9 +26,10 @@ TIME function -TIME - +

TIME +

TIME returns the current time value from values for hours, minutes and seconds. This function can be used to convert a time based on these three elements to a decimal time value. + TIME(Hour; Minute; Second) Use an integer to set the Hour. @@ -44,5 +40,8 @@ =TIME(0;0;0) returns 00:00:00 =TIME(4;20;4) returns 04:20:04 +
+ +
diff --git a/source/text/scalc/01/func_timevalue.xhp b/source/text/scalc/01/func_timevalue.xhp index eb03aada5c..7e6f442d5e 100644 --- a/source/text/scalc/01/func_timevalue.xhp +++ b/source/text/scalc/01/func_timevalue.xhp @@ -28,8 +28,9 @@ TIMEVALUE function -TIMEVALUE -TIMEVALUE returns the internal time number from a text enclosed by quotes and which may show a possible time entry format. +

TIMEVALUE

+TIMEVALUE returns the internal time number from a text enclosed by quotes and which may show a possible time entry format. + The internal number indicated as a decimal is the result of the date system used under $[officename] to calculate date entries. If the text string also includes a year, month, or day, TIMEVALUE only returns the fractional part of the conversion. @@ -38,5 +39,8 @@ =TIMEVALUE("4PM") returns 0.67. When formatting in time format HH:MM:SS, you then get 16:00:00. =TIMEVALUE("24:00") returns 0. If you use the HH:MM:SS time format, the value is 00:00:00. +
+ +
diff --git a/source/text/scalc/01/func_today.xhp b/source/text/scalc/01/func_today.xhp index 35b6bfdd27..ac5fee6e82 100644 --- a/source/text/scalc/01/func_today.xhp +++ b/source/text/scalc/01/func_today.xhp @@ -1,7 +1,4 @@ - - - - - - + TODAY @@ -31,14 +26,18 @@ TODAY function -TODAY - +

TODAY +

Returns the current computer system date. The value is updated when you reopen the document or modify the values of the document. + TODAY() TODAY is a function without arguments. TODAY() returns the current computer system date. +
+ +
diff --git a/source/text/scalc/01/func_weekday.xhp b/source/text/scalc/01/func_weekday.xhp index 2f23bdb6d0..2cc26363f5 100644 --- a/source/text/scalc/01/func_weekday.xhp +++ b/source/text/scalc/01/func_weekday.xhp @@ -33,9 +33,9 @@ -WEEKDAY +

WEEKDAY

Returns the day of the week for the given date value. The day is returned as an integer between 1 (Sunday) and 7 (Saturday) if no type or type=1 is specified. For other types, see the table below. - + WEEKDAY(Number; Type) Number, as a date value, is a decimal for which the weekday is to be returned. @@ -132,8 +132,8 @@ -These values apply only to the standard date format that you select under %PRODUCTNAME - Preferences -Tools - Options- %PRODUCTNAME Calc - Calculate. +These values apply only to the standard date format that you select under %PRODUCTNAME - Preferences +Tools - Options- %PRODUCTNAME Calc - Calculate. @@ -142,7 +142,10 @@ =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")
+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 31695d9953..a23d5cdf50 100644 --- a/source/text/scalc/01/func_weeknum.xhp +++ b/source/text/scalc/01/func_weeknum.xhp @@ -26,8 +26,8 @@ WEEKNUM function -WEEKNUM - +

WEEKNUM +

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: @@ -49,13 +49,14 @@ - System 2 + 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.
+ WEEKNUM(Number [; Mode]) @@ -65,7 +66,7 @@ - System + System Mode @@ -76,7 +77,7 @@ - System 1 + System 1 1 @@ -90,7 +91,7 @@ 2 - Monday + Monday @@ -98,7 +99,7 @@ 11 - Monday + Monday @@ -106,7 +107,7 @@ 12 - Tuesday + Tuesday @@ -114,7 +115,7 @@ 13 - Wednesday + Wednesday @@ -122,7 +123,7 @@ 14 - Thursday + Thursday @@ -130,7 +131,7 @@ 15 - Friday + Friday @@ -138,26 +139,26 @@ 16 - Saturday + Saturday - 17 + 17 - Sunday + Sunday - System 2 + System 2 21 - Monday (ISO 8601) + Monday (ISO 8601) @@ -165,7 +166,7 @@ 150 - (ISO 8601, for interoperability with Gnumeric) + (ISO 8601, for interoperability with Gnumeric)
@@ -176,5 +177,8 @@ =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 8304d3a971..a4de840922 100644 --- a/source/text/scalc/01/func_weeknum_ooo.xhp +++ b/source/text/scalc/01/func_weeknum_ooo.xhp @@ -26,10 +26,10 @@ WEEKNUM_OOO function -WEEKNUM_OOO - +

WEEKNUM_OOO +

WEEKNUM_OOO calculates the week number of the year for the internal date value. -This function exists for interoperability with %PRODUCTNAME releases older than 5.1.0 and OpenOffice.org. It calculates week numbers for a week numbering system in that week number 1 is the week that contains the January 4th. This function does not provide interoperability with other spreadsheet applications. For new documents use the WEEKNUM or ISOWEEKNUM function instead. +This function exists for interoperability with %PRODUCTNAME releases older than 5.1.0 and OpenOffice.org. It calculates week numbers for a week numbering system in that week number 1 is the week that contains the January 4th. This function does not provide interoperability with other spreadsheet applications. For new documents use the WEEKNUM or ISOWEEKNUM function instead. WEEKNUM_OOO(Number; Mode) @@ -44,5 +44,8 @@ =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_weeknumadd.xhp b/source/text/scalc/01/func_weeknumadd.xhp index 53f2347739..57f838d9a1 100644 --- a/source/text/scalc/01/func_weeknumadd.xhp +++ b/source/text/scalc/01/func_weeknumadd.xhp @@ -1,7 +1,4 @@ - - - - - - + WEEKNUM_EXCEL2003 @@ -31,10 +26,10 @@ WEEKNUM_EXCEL2003 function -WEEKNUM_EXCEL2003 - +

WEEKNUM_EXCEL2003 +

The result indicates the number of the calendar week for a date. -The WEEKNUM_EXCEL2003 function is designed to calculate week numbers exactly as Microsoft Excel 2003 did. Use the WEEKNUM function for ODF OpenFormula and Excel 2010 compatibility, or ISOWEEKNUM function when you just need ISO 8601 week numbers. In releases prior to $[officename] 5.1 WEEKNUM_EXCEL2003 was named WEEKNUM_ADD. +The WEEKNUM_EXCEL2003 function is designed to calculate week numbers exactly as Microsoft Excel 2003 did. Use the WEEKNUM function for ODF OpenFormula and Excel 2010 compatibility, or ISOWEEKNUM function when you just need ISO 8601 week numbers. In releases prior to $[officename] 5.1 WEEKNUM_EXCEL2003 was named WEEKNUM_ADD. WEEKNUM_EXCEL2003(Date; ReturnType) @@ -45,5 +40,8 @@ In which week number does 2001-12-24 fall? =WEEKNUM_EXCEL2003(DATE(2001;12;24);1) returns 52. +
+ +
diff --git a/source/text/scalc/01/func_workday.intl.xhp b/source/text/scalc/01/func_workday.intl.xhp index 4f4a31ae91..c986c5be3c 100644 --- a/source/text/scalc/01/func_workday.intl.xhp +++ b/source/text/scalc/01/func_workday.intl.xhp @@ -57,10 +57,7 @@ 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.
- - - -Date functions +
diff --git a/source/text/scalc/01/func_workday.xhp b/source/text/scalc/01/func_workday.xhp index 21120d6e0d..bd6f5c0030 100644 --- a/source/text/scalc/01/func_workday.xhp +++ b/source/text/scalc/01/func_workday.xhp @@ -1,7 +1,4 @@ - - - - - - + WORKDAY @@ -34,6 +29,7 @@

WORKDAY

The result is a date number that can be formatted as a date. You then see the date of a day that is a certain number of workdays away from the start date. + WORKDAY(StartDate; Days; Holidays) @@ -53,5 +49,8 @@ Date functions
+
+ +
diff --git a/source/text/scalc/01/func_year.xhp b/source/text/scalc/01/func_year.xhp index 0adf3b23c8..c2fe1b6357 100644 --- a/source/text/scalc/01/func_year.xhp +++ b/source/text/scalc/01/func_year.xhp @@ -1,7 +1,4 @@ - - - - - - + YEAR @@ -31,9 +26,10 @@ YEAR function -YEAR - -Returns the year as a number according to the internal calculation rules. +

YEAR +

+Returns the year as a number according to the internal calculation rules. + YEAR(Number) @@ -45,5 +41,10 @@ =YEAR(2) returns 1900 =YEAR(33333.33) returns 1991 +=YEAR(DATEVALUE('2010-09-28')) returns 2010. + +
+ +
diff --git a/source/text/scalc/01/func_yearfrac.xhp b/source/text/scalc/01/func_yearfrac.xhp index 20d5747c80..059a0e2028 100644 --- a/source/text/scalc/01/func_yearfrac.xhp +++ b/source/text/scalc/01/func_yearfrac.xhp @@ -1,7 +1,4 @@ - - - - - - + YEARFRAC @@ -31,9 +26,10 @@ YEARFRAC function -YEARFRAC - + +

YEARFRAC

The result is the number of the years (including fractional part) between StartDate and EndDate. + YEARFRAC(StartDate; EndDate; Basis) @@ -46,47 +42,47 @@ Basis - + Calculation - + 0 or missing - + US method (NASD), 12 months of 30 days each - + 1 - + Exact number of days in months, exact number of days in year - + 2 - + Exact number of days in month, year has 360 days - + 3 - + Exact number of days in month, year has 365 days - + 4 - + European method, 12 months of 30 days each @@ -97,5 +93,8 @@ 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. +
+ +