Add-in Functions/text/scalc/01/04060111.xhpSun Microsystems, Inc.UFI: fixed #i25199#add-ins; functionsfunctions; add-insFunction Wizard; add-insAdd-in FunctionsThe following describes and lists the available add-in functions.
Add-in conceptYou will also find a description of the $[officename] Calc add-in interface in the Help. In addition, important functions and their parameters are described in the Help for the Shared Library
$[officename] Calc add-in DLL.Add-ins supplied$[officename] contains examples for the add-in interface of $[officename] Calc. These provide the functions that you find in Function Wizard (choose Insert - Function) under the Add-in category, plus several of the financial functions.In the $[officename] Setup program, you can selectively deinstall the Calc Add-ins. Be aware that you will lose all functions listed under the Add-in category, plus several financial functions, if you do so.Analysis Functions Part OneAnalysis Functions Part TwoISLEAPYEAR functionISLEAPYEARDetermines whether a year is a leap year. If yes, the function will return the value 1 (TRUE); if not, it will return 0 (FALSE).SyntaxISLEAPYEAR(Date)Date: Specifies whether a given date falls within a leap year. The Date parameter must be a valid date according to the locale settings of %PRODUCTNAME.ExampleISLEAPYEAR(A1) returns 1, if A1 contains 2/29/68, the valid date 29th of February 1968 in your locale setting.You may also use ISLEAPYEAR("2/29/68").Never use ISLEAPYEAR(2/29/68), because this would first evaluate 2 divided by 29 devided by 68, and then calculate the ISLEAPYEAR function from this small number as a serial date number.YEARS functionYEARSCalculates the difference in years between two dates.SyntaxYEARS(Start date, End date, Type)Start date: First dateEnd date: Second dateType: Calculates the type of difference. Possible values are 0 (interval) and 1 (in calendar years).MONTHS functionMONTHSCalculates the difference in months between two dates.SyntaxMONTHS(Start date, End date, Type)Start date: First dateEnd date: Second dateType: Calculates the type of difference. Possible values include 0 (interval) and 1 (in calendar months).ROT13 functionROT13Encrypts a character string by moving the characters 13 positions in the alphabet. After the letter Z, the alphabet begins again (Rotation). By applying the encryption function again to the resulting code, you can decrypt the text.SyntaxROT13(Text)Text: Enter the character string to be encrypted. ROT13(ROT13(Text)) decrypts the code.DAYSINYEAR functionDAYSINYEARCalculates the number of days in the year until a given date.SyntaxDAYSINYEAR(Date)Date: The date up through which a number of days in the year is calculated. The Date parameter must be a valid date according to the locale settings of %PRODUCTNAME.ExampleDAYSINYEAR(A1) returns 366 days if A1 contains 2/29/68, a valid date for the year 1968.DAYSINMONTH functionDAYSINMONTHCalculates the number of days in a month until a given date.SyntaxDAYSINMONTH(Date)Date: The date up through which the days in the month is calculated. The Date parameter must be a valid date according to the locale settings of %PRODUCTNAME.ExampleDAYSINMONTH(A1) returns 29 days if A1 contains 2/17/68, a valid date for February 1968.WEEKS functionWEEKSCalculates the difference in weeks between two dates.SyntaxWEEKS(Start date, End date, Type)Start date: First dateEnd date: Second dateType: Calculates the type of difference. The possible values are 0 (interval) and 1 (in numbers of weeks).WEEKSINYEAR functionWEEKSINYEARCalculates the number of weeks in a year until a certain date. The number of weeks is defined as follows: a week that spans two years is added to the year in which most days of that week occur.SyntaxWEEKSINYEAR(Date)Date: The date until which the weeks in the year will be calculated. The Date parameter must be a valid date according to the locale settings of %PRODUCTNAME.ExampleWEEKSINYEAR(A1) returns 53 if A1 contains 2/17/70, a valid date for the year 1970.Add-ins through %PRODUCTNAME APIAdd-ins can also be implemented through the %PRODUCTNAME API.