GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
Overview
The SubtractDates function subtracts two date (and time) values and returns the difference in whole days.
Syntax/Parameters
Syntax
int = SubtractDates ( string a, string b );
Parameters
a b
string values in ISO-8601 format. The format need not contain the time.
Return Value
Returns an int as the number of whole days or a formatted error code on failure. The lower nybble of the error code specifies if a syntax error is in a or b.
Remarks
The SubtractDates function takes the date a, subtracts the date b from it, and returns the number of days different. If time values are provided, they are counted as part of the date. Therefore, subtracting 2015-02-02T12:30 from 2015-02-03T11:30 will result in 0 days. Subtracting 2015-02-02T12:30 from 2015-02-03T11:30 will result in 1 day.
The SubtractDates function will count the leap years and days of months to make its adjustments. The source dates must be later than January 1, 1601.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.