GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
Overview
The AddDuration function adds or subtracts an ISO duration string to an ISO-8601 formatted date/time and returns an ISO-8601 date/time..
Syntax/Parameters
Syntax
string = AddDuration ( string value, string bias );
Parameters
value
A string in ISO-8601 format. The format need not contain the time.
bias
An string containing a formatted ISO duration such as P1D or P1Y1M.
Return Value
Returns a string as an adjusted ISO-8601 date or an empty string on failure. Use the GetLastError function to retrieve a formatted error code. The most common error is a format or syntax error in the source value parameter.
Remarks
The AddDuration applies the date/time adjustment in two modes: (1) values of days or lesser fraction are added via seconds math while (2) months and years are added as whole units. As such adding P90D is not the same as adding P1M. The value 90 days is not exactly three months.
When adding months, if the day of the month is at the end of the month, the last day of the month will be adjusted accordingly. For example, P3M on 03-31 will result in 06-30, not 06-31.
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.