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
268c3621
Commit
268c3621
authored
Mar 04, 2020
by
Michel Juillard
Browse files
add exports, fix typo
parent
93739319
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Periods.jl
View file @
268c3621
...
...
@@ -3,6 +3,6 @@ module Periods
abstract type
AbstractPeriod
end
include
(
"SimplePeriods.jl"
)
export
Period
export
Frequency
,
Period
,
Year
,
Semester
,
Quarter
,
Month
,
Week
,
Day
end
# module
src/SimplePeriods.jl
View file @
268c3621
@enum
Frequency
Year
Semester
Quarter
Month
Week
Business
Day
struct
Period
struct
Period
<:
AbstractPeriod
ordinal
::
Int64
frequency
::
Frequency
end
function
Period
(
year
,
subperiod
,
frequency
)
<:
AbstractPeriod
function
Period
(
year
,
subperiod
,
frequency
)
if
frequency
==
Year
ordinal
=
year
-
1970
elseif
frequency
==
Semester
...
...
Write
Preview
Supports
Markdown
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