class |
TSDateParser
Parser that assembles TSDate objects from an input string, for
example
1960
1960.1
1960 I
1960 1/4
1960 Q4
1960 m11
The following rules apply for parsing:
XX x"/"y , for example 1960 1/1 is
recognized for arbitrary sub periodicities with mainPeriod=XX, subPeriod=x,
subPeriodicity=y
XX ["M","m"]x , for example 1960 M1 is
recognized as mainPeriod=XX, subPeriod=x, subPeriodicity=12 (monthly)
XX ["Q","q"]x , for example 1960 Q1 is
recognized as mainPeriod=XX, subPeriod=x, subPeriodicity=4 (quarterly)
XX ["I", "II"] , for example 1960 I is
recognized as mainPeriod=XX, subPeriod=1 or 2, subPeriodicity=2 (half yearly)
XX , for example 1960 is recognized as
mainPeriod=XX, subPeriod=1, subPeriodicity=1 (yearly)
XX.x , for example 1960.1 is recognized as
mainPeriod=XX, subPeriod=x, subPeriodicity=subPeriodicity (needs to be set as
argument)
You can use the parser via the
parseString(input, subPeriodicity) method. |