Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
MichelJuillard
Periods.jl
Commits
93739319
Commit
93739319
authored
Mar 04, 2020
by
MichelJuillard
Browse files
update
parent
a8d1eab6
Changes
2
Show whitespace changes
Inline
Side-by-side
src/Periods.jl
View file @
93739319
module
Periods
abstract type
AbstractPeriod
end
include
(
"SimplePeriods.jl"
)
export
Period
end
# module
src/SimplePeriods.jl
View file @
93739319
@enum
Frequency
Year
Semester
Quarter
Month
Week
Business
Day
struct
Simple
Period
struct
Period
ordinal
::
Int64
frequency
::
Frequency
end
function
Simple
Period
(
year
,
subperiod
,
frequency
)
function
Period
(
year
,
subperiod
,
frequency
)
<:
AbstractPeriod
if
frequency
==
Year
ordinal
=
year
-
1970
elseif
frequency
==
Semester
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment