Commit 614fece4 authored by Michel Juillard's avatar Michel Juillard
Browse files

beginning description

parent 8bae6d63
# Periods package
The Periods package provide a compact representation of time periods used in statistics. A Period is represented by the frequency and an ordinal starting in 1970-01-01.
Using an ordinal integer simplifies period arithmetic. Main functionalities contains parsing of strings into Periods and formatting of Periods in user controlled representations.
No support is provided for infra day time periods.
## Frequencies
The following frequencies are supported: year, semester, quarter, month, week, day, undated
Implemented as an ``enum`` ?
## Constructors
- Period(year::Integer, frequency)
- Period(year::Integer, subperiod::Integer, frequency)
- Period(year::Integer, month, day, [frequency])
## Shortcuts
- year(year::Integer)
- semester(year::Integer, semester::[1,2])
- quarter(year::Integer, quarter::[1:4])
- month(year::Integer, month::[1:12])
- week(year::Integer, week::[1:53])
- day(year::Integer, month::Integer, day::Integer)
## Period ranges
```
Period(2010, 3, :Month):(Period(2011,12, :Month) must be equivalent to a vector of Periods. Frequency must be the same at both ends.
## Parsing and formatting
- parsing and formating of period strings is implemented as an extension of the mechanism used for dates in Julia Standard Library. Some default formats will be provided. Be careful about ambiguous representations.
## Integer arithmetic must be supported
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment