SIMPOL Documentation

DAYS()

Description

This function implements the DAYS() function for Superbase BASIC Language SBL compatibility. It calls the SBLDays() function to read the date string and return a date object. It then retrieves the integer value of the date and adjusts it to what it should be for an SBL date. There are a few differences between the Julian date values in SBL and in SIMPOL. SBL implements the Gregorian calendar reform between September 2nd and September 14th, 1752 and considers dates that fall in the range of 3 September, 1752 and 13 September, 1752 to be illegal. That is mostly okay, except that it unfortunately still applies correct Gregorian formatting to the dates prior to that point resulting in 11 days too many in the Julian value. SBL also considers the date 1 January 0001 to be the value 1, while SIMPOL considers the same date to be the value 0. SIMPOL also assumes a correct astronomical calendar throughout and any adjustments for incorrectly calculated calendars are considered a localization issue. Returns the date corrected for SBL compatibility.

Prototype

DAYS ( string value, string format, SBLlocaledateinfo ldiLocale, integer error )

Parameters

ParameterDefault valueType nameDescription
valueNonestring
formatNonestring
ldiLocaleNoneSBLlocaledateinfo
errorNoneinteger